Is your feature request related to a problem? Please describe.
We need to build a feature to like a comment. We also need a way to keep track of the number of times an article is viewed.
Models
Article
Comment
Schemas
API Routes
Endpoints | HTTP Method | Description | Tested
/api/articles/{{slug}} | Get | The view count should increase each time this is called |
/api/comments/{{commentId}}/favorite | POST | Add the user to the comment's favorites relationship |
Create/Edit Functions
get_article
- Each time function is called, add 1 to the view count.
favorite_a_comment
- Should query for the comment and profile. If they both exist then add the profile to the comment's favorite
Additional context
Is your feature request related to a problem? Please describe.
We need to build a feature to like a comment. We also need a way to keep track of the number of times an article is viewed.
Models
Schemas
API Routes
Endpoints | HTTP Method | Description | Tested
/api/articles/{{slug}} | Get | The view count should increase each time this is called |
/api/comments/{{commentId}}/favorite | POST | Add the user to the comment's favorites relationship |
Create/Edit Functions
Additional context
backend/tests/test_articles.pyfile. Some of them don't currently pass. So adjust the routes or tests accordingly to make sure that they work.