Skip to content

Commit

Permalink
fix: syncronize vote count when multiple organizers are logged in (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
edalholt authored Sep 24, 2023
1 parent c9a34d1 commit 85bd3ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/controllers/votation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ export async function deactivateVotationStatus(
);
});

notifyOrganizers(group, JSON.stringify({ voteEnded: true }));

return res
.status(200)
.json({ message: "Votation successfully deactivated" });
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/EditAssembly.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export function EditAssembly(state: { group: UserDataGroupType }) {
submittedVotes + parseInt(decodedMessage.voteSubmitted)
);
}
if (decodedMessage.voteEnded) {
setSubmittedVotes(0);
}
}
}, [lastMessage]);

Expand Down

0 comments on commit 85bd3ba

Please sign in to comment.