debug
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 4m53s
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 4m53s
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user