feat : update history

This commit is contained in:
lukman
2024-08-20 14:46:47 +08:00
parent f090af8f7d
commit 6076de2051
4 changed files with 53 additions and 23 deletions

View File

@@ -16,6 +16,8 @@ export async function GET(request: Request) {
const { searchParams } = new URL(request.url);
const idDivision = searchParams.get("division");
const isDate = searchParams.get("date")
if (idDivision != "null" && idDivision != null && idDivision != undefined) {
const cekDivision = await prisma.division.count({
@@ -33,6 +35,7 @@ export async function GET(request: Request) {
where: {
isActive: true,
idDivision: idDivision,
dateStart: new Date(String(isDate))
},
select: {
id: true,