Skip to content

Voting for resources should be limited to one per user #211

@aaron-junot

Description

@aaron-junot

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions