From 60c8a6f3cfbf76f693472225b57a061daa33d77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudelet?= Date: Wed, 22 Apr 2026 20:08:43 +0200 Subject: [PATCH] Gestion de conflit : Suppression du GET --- routes/(apps)/notes/api/ue-modules.ts | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/routes/(apps)/notes/api/ue-modules.ts b/routes/(apps)/notes/api/ue-modules.ts index ba56b66..6106d18 100644 --- a/routes/(apps)/notes/api/ue-modules.ts +++ b/routes/(apps)/notes/api/ue-modules.ts @@ -4,36 +4,6 @@ import { ueModules } from "../../../../databases/schema.ts"; import { and, eq } from "npm:drizzle-orm"; export const handler: Handlers = { - // #37 GET /ue-modules - async GET(request) { - try { - const url = new URL(request.url); - const idPromo = url.searchParams.get("idPromo"); - const idUEParam = url.searchParams.get("idUE"); - - const idUE = idUEParam ? parseInt(idUEParam) : null; - - if (idUEParam && isNaN(idUE!)) { - return new Response("Paramètre idUE invalide", { status: 400 }); - } - - const result = await db.select().from(ueModules).where( - and( - idPromo ? eq(ueModules.idPromo, idPromo) : undefined, - idUE ? eq(ueModules.idUE, idUE) : undefined, - ), - ); - - return new Response(JSON.stringify(result), { - status: 200, - headers: { "Content-Type": "application/json" }, - }); - } catch (error) { - console.error("Error fetching UE-modules:", error); - return new Response("Failed to fetch data", { status: 500 }); - } - }, - // #38 POST /ue-modules async POST(request) { try {