mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-22 06:59:05 -05:00
Fix bug where changing own voting score didnt work
This commit is contained in:
parent
41dd98ca09
commit
37bf81ffa4
|
|
@ -575,6 +575,11 @@ const editVote = async ({
|
|||
where: { userId: { in: [userId, input.userId] } },
|
||||
});
|
||||
|
||||
// deal with special case of user adjusting vote about themselves
|
||||
if (statuses.length === 1) {
|
||||
statuses[1] = statuses[0];
|
||||
}
|
||||
|
||||
if (
|
||||
statuses[0].region !== statuses[1].region &&
|
||||
![-1, 1].includes(input.score)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user