• wrote unit tests
• Document the endpoints using swagger
• Added two endpoints for like and unlike
• Restricted the access to use the endpoints only to logged in users
Hey @dusmel , It is actually possible to implement a nested ternary , useful for adding validation on req.body, req.params and req.query at the same time
What does this PR do?
• Enable users to like or unlike an article
Description of Task to be completed?
• wrote unit tests • Document the endpoints using swagger • Added two endpoints for like and unlike • Restricted the access to use the endpoints only to logged in users
How should this be manually tested?
• Like
POST api/articles/:slug/favorite
• Unlike
DELETE api/articles/:slug/favorite
Any background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
165020129
Screenshots (if appropriate)
Questions:
N/A