From 4d37248040905a08b809d880b61be5563860b514 Mon Sep 17 00:00:00 2001 From: amel Date: Thu, 26 Sep 2024 15:25:50 +0800 Subject: [PATCH] fix : calender Deskripsi: - history backend>> batas nya sampe hari ini No Issues --- src/app/api/calender/history/route.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/api/calender/history/route.ts b/src/app/api/calender/history/route.ts index 40ce2d1..fc789b1 100644 --- a/src/app/api/calender/history/route.ts +++ b/src/app/api/calender/history/route.ts @@ -5,7 +5,7 @@ import { funGetUserByCookies } from "@/module/auth"; import { prisma } from "@/module/_global"; import _ from "lodash"; -// GET HSITORY +// GET HISTORY export async function GET(request: Request) { try { const user = await funGetUserByCookies() @@ -33,6 +33,9 @@ export async function GET(request: Request) { where: { isActive: true, idDivision: idDivision, + dateEnd: { + lte: new Date() + }, DivisionCalendar: { title: { contains: (name == undefined || name == "null") ? "" : name,