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
Some checks are pending
Main / build-and-push-docker-image (20.x) (push) Waiting to run
This commit is contained in:
@@ -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 } }
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user