stacker.news/prisma
SatsAllDay e3571af1e1
Make Polls Anonymous (#1197)
* make polls anonymous

Introduce a `PollBlindVote` DB table that tracks when a user votes in a poll,
but does not track which choice they made.

Alter the `PollVote` DB table to remove the `userId` column, meaning `PollVote`
now tracks poll votes anonymously - it captures votes per poll option,
but does not track which user submitted the vote.

Update the `poll_vote` DB function to work with both tables now.

Update the `item.poll` resolver to calculate `meVoted` based on the `PollBlindVote`
table instead of `PollVote`.

* remove `meVoted` on `PollOption`s

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-06-03 13:56:43 -05:00
..
migrations Make Polls Anonymous (#1197) 2024-06-03 13:56:43 -05:00
schema.prisma Make Polls Anonymous (#1197) 2024-06-03 13:56:43 -05:00
seed.js Move the `AD` badge to be alongside other item info badges (#647) 2023-11-20 08:33:59 -06:00