Skip to content

Conversation

@mshinh
Copy link
Contributor

@mshinh mshinh commented Dec 12, 2020

Fixes #59

@wnbck wnbck self-requested a review December 12, 2020 09:18
Copy link
Contributor

@wnbck wnbck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments

routers/users.js Outdated
if (!users) {
throw new Error(`Can not find a user by this username`);
}
return res.json(users);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember here you return "users" which makes sense according to your code, but the route wants to find a single user. Now you return an array, it makes sense to just return an object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make changes accordingly. Thanks

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.

add test for get all user

2 participants