From 5b2128847b85a06be6905b137af9121c0a54d67e Mon Sep 17 00:00:00 2001 From: gibbyb Date: Sat, 20 Jul 2024 21:25:40 -0500 Subject: [PATCH] Hoping this lets it build. --- src/app/api/update_technicians/route.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/app/api/update_technicians/route.ts b/src/app/api/update_technicians/route.ts index 10cda43..25a6f5a 100644 --- a/src/app/api/update_technicians/route.ts +++ b/src/app/api/update_technicians/route.ts @@ -15,11 +15,6 @@ const isTechnician = (technician: unknown): technician is Technician => { 'status' in technician && typeof (technician as Technician).status === 'string'; }; -// Ensure the body is properly typed -interface RequestBody { - technicians: Technician[]; -} - export const POST = async (request: Request) => { try { const url = new URL(request.url); @@ -42,7 +37,7 @@ export const POST = async (request: Request) => { return NextResponse.json({ message: 'Invalid input: missing name or status for a technician.' }, { status: 400 }); } - await legacyUpdateEmployeeStatusByName(technicians as Technician[]); + await legacyUpdateEmployeeStatusByName(technicians); return NextResponse.json({ message: 'Technicians updated successfully.' }, { status: 200 }); } catch (error) {