Currently, there is no way for users of the Learnify app to upvote or downvote post within the app. This feature would allow users to give feedback on the usefulness and quality of the post and would also provide valuable information for post curation and improvement.
We propose the creation of a new endpoint in the backend of the Learnify app that allows users to upvote or downvote post. This endpoint should accept a user ID, a Learning Space ID ,a post ID, and an upvote or downvote action as inputs and update the relevant post's upvote and downvote counts accordingly.
Step Details
Steps that will be performed:
[x] Add new fields to the post model to store upvote and downvote counts:
upvotes: int
downvotes: int
[x] Create a new endpoint in the backend API at /learningspace/post/vote that accepts a username by token, vote_type (either "upvote"
or "downvote"), and post& LS ID as in the request body.
[x] Manually test over postman and share documentation
Final Actions
The review and merge of the PR will close the issue.
Issue Description
Currently, there is no way for users of the Learnify app to upvote or downvote post within the app. This feature would allow users to give feedback on the usefulness and quality of the post and would also provide valuable information for post curation and improvement.
We propose the creation of a new endpoint in the backend of the Learnify app that allows users to upvote or downvote post. This endpoint should accept a user ID, a Learning Space ID ,a post ID, and an upvote or downvote action as inputs and update the relevant post's upvote and downvote counts accordingly.
Step Details
Steps that will be performed:
Final Actions
The review and merge of the PR will close the issue.
Deadline of the Issue
24.12.2022 - 00.00
Reviewer
None
Deadline for the Review
25.12.2022 - 00.00