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

Follow/Unfollow user #17

Closed
GansukhB opened this issue Dec 20, 2021 · 1 comment
Closed

Follow/Unfollow user #17

GansukhB opened this issue Dec 20, 2021 · 1 comment
Assignees

Comments

@GansukhB
Copy link
Owner

-[] Follow model

"followerId": <id of user following>,
"followingId": <id of user being followed
timestamps: true

-[] Follow user requests

Method: POST
URL: /follow

{
"userId": <id of user to be followed>
}
followerId-g access token-s авч хадгална

Response:

success
{
"message": "followed",
}

If there is no user found with id:

statusCode: 404
{
"message": "user not found
}

Хэрэглэгч бие биеэ дагасан тохиолдолд

statusCode: 200
{
"message": "followed",
}
@GansukhB
Copy link
Owner Author

2 user-ийн ID талбарыг mongoose objectId ашиглана.

https://mongoosejs.com/docs/populate.html жишээ харах.

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

No branches or pull requests

2 participants