debug
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 4m53s

This commit is contained in:
2025-12-18 17:12:45 -05:00
parent ff534f4df5
commit 17a586a0af

View File

@@ -138,14 +138,10 @@ export const resolvers = {
const calculatedStats = allStats.reduce(
(acc, curr) => {
const links = (acc.linksDeleted += curr.linksDeleted);
const commands = (acc.commandResponses += curr.commandResponses);
const triggers = (acc.timesTriggered += curr.timesTriggered);
return {
linksDeleted: links,
commandResponses: commands,
timesTriggered: triggers
linksDeleted: (acc.linksDeleted += curr.linksDeleted),
commandResponses: (acc.commandResponses += curr.commandResponses),
timesTriggered: (acc.timesTriggered += curr.timesTriggered)
};
},
{
@@ -163,7 +159,9 @@ export const resolvers = {
}
});
return await prisma.totalStats.update({
console.log("Total stats:", totalStats);
const updatedTotalStats = await prisma.totalStats.update({
where: {
createdAt: totalStats?.createdAt
},
@@ -171,6 +169,10 @@ export const resolvers = {
...calculatedStats
}
});
console.log("Updated Total stats:", totalStats);
return updatedTotalStats;
},
addGroup: async (
_parent: unknown,