incubrain / nuxt-feedback

Building a feedback system that integrates with GitHub
https://nuxt-supabase-auth-sable.vercel.app
0 stars 0 forks source link

Upvote feedback #9

Open JapneetRajput opened 12 months ago

JapneetRajput commented 12 months ago

@Drew-Macgibbon For upvote feedback currently we have a votes (int8) column in our feedback table.

But if we only keep the count of the votes, a single user might be able to vote more than once. So I was thinking of keeping an array of UUIDs so that we can track whether a user has liked a feedback or not.

Flow : If a user clicks on the upvote button, it will check if the UUID exists in the votes array or not if it doesn't it will append it and if it does it will remove it.