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(
|
const calculatedStats = allStats.reduce(
|
||||||
(acc, curr) => {
|
(acc, curr) => {
|
||||||
const links = (acc.linksDeleted += curr.linksDeleted);
|
|
||||||
const commands = (acc.commandResponses += curr.commandResponses);
|
|
||||||
const triggers = (acc.timesTriggered += curr.timesTriggered);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
linksDeleted: links,
|
linksDeleted: (acc.linksDeleted += curr.linksDeleted),
|
||||||
commandResponses: commands,
|
commandResponses: (acc.commandResponses += curr.commandResponses),
|
||||||
timesTriggered: triggers
|
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: {
|
where: {
|
||||||
createdAt: totalStats?.createdAt
|
createdAt: totalStats?.createdAt
|
||||||
},
|
},
|
||||||
@@ -171,6 +169,10 @@ export const resolvers = {
|
|||||||
...calculatedStats
|
...calculatedStats
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("Updated Total stats:", totalStats);
|
||||||
|
|
||||||
|
return updatedTotalStats;
|
||||||
},
|
},
|
||||||
addGroup: async (
|
addGroup: async (
|
||||||
_parent: unknown,
|
_parent: unknown,
|
||||||
|
|||||||
Reference in New Issue
Block a user