From 96724534f9afa9d38dde6da7cd6499fe6f1f5dc6 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sun, 30 Jan 2022 17:41:23 +0100 Subject: [PATCH] Fix voting count votes_count needs to be summed up --- functions/graphql/resolvers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/graphql/resolvers.js b/functions/graphql/resolvers.js index b35b32b..158c491 100644 --- a/functions/graphql/resolvers.js +++ b/functions/graphql/resolvers.js @@ -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