From 3a437d78d4aea9f74c3a5057588f78767f07a740 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:55:54 +0700 Subject: [PATCH] fix: wrong notification query condition --- src/controllers/00-notification-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/00-notification-controller.ts b/src/controllers/00-notification-controller.ts index 00baff7..a2034de 100644 --- a/src/controllers/00-notification-controller.ts +++ b/src/controllers/00-notification-controller.ts @@ -60,7 +60,7 @@ export class NotificationController extends Controller { ], NOT: { readByUser: { some: { id: req.user.sub } }, - createdAt: dayjs().subtract(7, "days").toDate(), + createdAt: { lte: dayjs().subtract(7, "days").toDate() }, }, }; const [result, total] = await prisma.$transaction([