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

GET | /users/:userId #20

Open
3 tasks
Osama-you opened this issue Feb 1, 2021 · 0 comments
Open
3 tasks

GET | /users/:userId #20

Osama-you opened this issue Feb 1, 2021 · 0 comments
Labels

Comments

@Osama-you
Copy link
Member

relates #5

Route: GET api/v1/users/:userId

Acceptance Criteria

  • DB query
  • Response
  • Testing

DB query

SELECT * FROM users WHERE id = userId;

Response

  • Success
{ 
    statusCode:200 ,
     data:  
     { 
        user_id,
        user_name,
        email,
        password,
        is_admin,
        create_at
     }
}
  • Failed
{
    statusCode:404, 
    message:'User not found',
}

Testing

to be a successful test

  • status === 200
  • typeof(data) === 'object'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant