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

Back-end Route| Login [ADMIN | CLIENT] #16

Closed
2 tasks done
hassanannajjar opened this issue Sep 10, 2020 · 0 comments
Closed
2 tasks done

Back-end Route| Login [ADMIN | CLIENT] #16

hassanannajjar opened this issue Sep 10, 2020 · 0 comments

Comments

@hassanannajjar
Copy link
Collaborator

hassanannajjar commented Sep 10, 2020

Back-end Route: login

post username and password to the server to get token

Route : /login

Method : post


Main Things :

  • Database
  • Response

Database :

  • check user in database

Response :

Response may be success or error :

  • Error :
    {
    error: "bad request",
    "Status-Code": 400
    }
  • if email or number not exist :
    {
    error: "email or number does not exist",
    "Status-Code": 403
    }
  • Success
    {
    data: { message: "Login successfully" }
    "Status-Code": 200    
    }
@hassanannajjar hassanannajjar self-assigned this Sep 15, 2020
@ahmadysalah ahmadysalah self-assigned this Sep 22, 2020
ahmadysalah added a commit that referenced this issue Sep 22, 2020
- create login client route in auth end point
- get data from database by phone number
- compare password
-response data and token
#16
ahmadysalah added a commit that referenced this issue Sep 22, 2020
ahmadysalah added a commit that referenced this issue Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants