-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
Description
Currently, you can upvote or downvote a resource over and over again. It should be limited to one vote per user. If the user has upvoted a resource and then downvotes the same resource, the upvote should clear out and be replaced by the downvote (and vice versa).
For the moment, users can be tracked by their API credentials, so all of this should be determined by the API key provided.
Acceptance criteria:
- The
/upvote
and/downvote
endpoints should need authentication - Votes should be restricted to one per API key
- Votes from a certain user should be able to be cleared out by sending an additional request to either of the vote endpoints. If it is the same vote endpoint, it should simply be cleared out. If it is the opposite vote endpoint, it should clear out the existing vote and update the vote.