Closed GansukhB closed 2 years ago
-[] 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", }
2 user-ийн ID талбарыг mongoose objectId ашиглана.
https://mongoosejs.com/docs/populate.html жишээ харах.
-[] Follow model
-[] Follow user requests
Method: POST URL: /follow
Response:
If there is no user found with id:
Хэрэглэгч бие биеэ дагасан тохиолдолд