From c7bd480e91562e402884f447c24c2dd2042c491e Mon Sep 17 00:00:00 2001 From: Arpit Gupta Date: Mon, 30 Mar 2026 21:00:25 +0530 Subject: [PATCH] chore: remove unused local room create endpoint --- app/api/room/create/route.tsx | 38 ----------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 app/api/room/create/route.tsx diff --git a/app/api/room/create/route.tsx b/app/api/room/create/route.tsx deleted file mode 100644 index 59adeaf92..000000000 --- a/app/api/room/create/route.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { createRoomWithReport } from "@/lib/supabase/createRoomWithReport"; -import { NextRequest } from "next/server"; - -export async function GET(req: NextRequest) { - const topic = req.nextUrl.searchParams.get("topic"); - const account_id = req.nextUrl.searchParams.get("account_id"); - const report_id = req.nextUrl.searchParams.get("report_id"); - const artist_id = req.nextUrl.searchParams.get("artist_id"); - const chat_id = req.nextUrl.searchParams.get("chat_id"); - - if (!topic || !account_id) { - return Response.json( - { message: "Missing required parameters" }, - { status: 400 } - ); - } - - try { - const result = await createRoomWithReport({ - account_id, - topic, - report_id: report_id || undefined, - artist_id: artist_id || undefined, - chat_id: chat_id || undefined, - }); - - return Response.json(result, { status: 200 }); - } catch (error) { - console.error("Error in /api/room/create:", error); - const message = - error instanceof Error ? error.message : "Failed to create room"; - return Response.json({ message }, { status: 400 }); - } -} - -export const dynamic = "force-dynamic"; -export const fetchCache = "force-no-store"; -export const revalidate = 0;