Cast or change a vote on a study guide
POST/study-guides/:study_guide_id/votes
Upserts the authenticated user's vote on the guide. Same-direction
re-submits are no-ops; opposite-direction submits flip the vote.
Returns the post-upsert vote_score so the UI can update without
a refetch. Soft-deleted guides return 404. Creators may vote on
their own guides (no self-vote restriction).
Request
Responses
- 200
- 400
- 401
- 404
- 500
Vote applied; returns the resulting state.
Bad request
Unauthorized
Not found
Internal server error