In the early implementation of voting mechanism, there was no way to remove a vote. Since I implemented this feature and am familiar with it, it is assigned to me.
Vote mechanism should work like this:
If there was no vote and 1 or -1 is given (upvote/downvote) then it directly affects as it is.
If user's vote was -1 and 1 is given then the new vote will be 1 and vice versa.
If user's vote was 1 and 1 is given again, then the vote will be removed. Same applies for -1
Please review the above explanation and let me know if anything is wrong.
In the early implementation of voting mechanism, there was no way to remove a vote. Since I implemented this feature and am familiar with it, it is assigned to me.
Vote mechanism should work like this: If there was no vote and 1 or -1 is given (upvote/downvote) then it directly affects as it is. If user's vote was -1 and 1 is given then the new vote will be 1 and vice versa. If user's vote was 1 and 1 is given again, then the vote will be removed. Same applies for -1
Please review the above explanation and let me know if anything is wrong.
Due Date: 20.12.2022 23.59 Reviewer: @askabderon