From 5c7723316bfe9e7b25053bcaf41c7195ded2c2c1 Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Thu, 26 May 2022 19:10:17 +0300 Subject: [PATCH] fix: donation stats --- functions/graphql/types/donation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/graphql/types/donation.js b/functions/graphql/types/donation.js index ed7e327..50ebb75 100644 --- a/functions/graphql/types/donation.js +++ b/functions/graphql/types/donation.js @@ -127,9 +127,8 @@ const getDonationsStats = extendType({ where: { paid: true } - }).then(d => d._sum.amount), + }).then(d => d._sum.amount ?? 0), prisma.project.count()]); - // #TODO add a measurement unit for prizes & donations (eg. $ or sats or BTC) return { prizes: 2600,