You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently we do not have endpoints for liking or unliking posts
Describe the solution you'd like
Implement two endpoints: POST /posts/:id/like for liking a post (does not require a body) and DELETE /posts/:id/like for unliking a post. Those endpoints should automatically add/remove entries from the liked-posts table
Add tests for the two endpoints
The text was updated successfully, but these errors were encountered:
* Like & unlike endpoint implemented
* Added a test and Fixed a small mistake
* fixed a bug in a unit test
* reorganised the unit test into its own describe function
* Fixed unit test :
- my unit test will not use other endpoint to create model object.
- we directly create a model and only use endpoint that we are testing.
* Fixed a typo in unit test
Is your feature request related to a problem? Please describe.
Currently we do not have endpoints for liking or unliking posts
Describe the solution you'd like
Add tests for the two endpoints
The text was updated successfully, but these errors were encountered: