Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP: Referral Backend #3

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

MVP: Referral Backend #3

wants to merge 16 commits into from

Conversation

eapenzacharias
Copy link
Owner

Initial Setup with Devise and Devise Token Auth

  • Created Rails app in API only mode
  • Setup Rubocop Linters
  • Created User model
  • Set up Devise and Auth Token for User model
  • Sign up working in API mode /api/auth [POST]
    • sample request body
      { 
         "email": "user@test.com",
         "password": "1234567",
         "password_confirmation": "1234567",
         "name": "User"
      }
      
  • Sign in working in API mode /api/api/auth/sign_in [POST]
    • sample request body
      {
         "email": "user@test.com",
         "password": "1234567"
      }
      

Setup Referral

  • Created referral URL. API URL example: http://website.com/api/auth/?referrer=1
  • Get all successful referrals of a user. API URL: http://website.com/api/referrals
  • Get the details of the user who referred current_user http://website.com/api/referred_by
  • Send invite email with the referral URL to an email. API URL: http://website.com/api/send_invite
    • Request Format
       {
           "email": "name@domain.com"
       }
      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant