Fix voting count

votes_count needs to be summed up
This commit is contained in:
Michael Bumann
2022-01-30 17:41:23 +01:00
parent 262d54cc43
commit 96724534f9

View File

@@ -206,7 +206,7 @@ module.exports = {
await context.prisma.project.update({
where: { id: project.id },
data: {
votes_count: (project.votes_count = vote.amount_in_sat),
votes_count: project.votes_count + vote.amount_in_sat,
},
});
// return the current vote