Removed image. Added gradient. Removed unnecessary logic in resolvers. Added line chart label.
Some checks are pending
Main / build-and-push-docker-image (20.x) (push) Waiting to run

This commit is contained in:
2025-12-16 17:11:44 -05:00
parent 0b0039ce01
commit 07aa4ff6b5
3 changed files with 55 additions and 41 deletions

View File

@@ -37,6 +37,11 @@ export const resolvers = {
// _ctx: unknown
) => {
const { startDate, endDate } = data;
if (!startDate || !endDate) {
return null;
}
return await prisma.dailyStats.findMany({
where: {
createdAt: {
@@ -59,23 +64,12 @@ export const resolvers = {
_parent: unknown,
data: { groupID: number }
// _ctx: unknown
) => {
const groupIDInt = BigInt(data.groupID);
const group = await prisma.groups.findUnique({
) =>
await prisma.groups.findUnique({
where: {
telegramID: groupIDInt
telegramID: BigInt(data.groupID)
}
});
if (group === null) {
const groups = await prisma.groups.findMany({
orderBy: { name: "asc" }
});
}
return group;
}
})
},
Mutation: {
init: async (
@@ -230,7 +224,6 @@ export const resolvers = {
// _ctx: unknown
) => {
const { groupID, linksDeleted, mutationKey } = data;
const groupIDInt = BigInt(groupID);
if (env !== "development") {
if (!mutationKey) {
@@ -243,7 +236,7 @@ export const resolvers = {
}
return await prisma.groups.update({
where: { telegramID: groupIDInt },
where: { telegramID: BigInt(groupID) },
data: { linksDeleted: { increment: linksDeleted } }
});
},