From 2efef7baae01c47f3b1388bfd385edec5e146896 Mon Sep 17 00:00:00 2001 From: Arpit Gupta Date: Wed, 8 Apr 2026 00:05:00 +0530 Subject: [PATCH] chore: remove unused account add artist route --- app/api/account/add_artist/route.tsx | 36 ---------------------------- 1 file changed, 36 deletions(-) delete mode 100644 app/api/account/add_artist/route.tsx diff --git a/app/api/account/add_artist/route.tsx b/app/api/account/add_artist/route.tsx deleted file mode 100644 index 4443f7f72..000000000 --- a/app/api/account/add_artist/route.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import supabase from "@/lib/supabase/serverClient"; -import { NextRequest } from "next/server"; - -export async function GET(req: NextRequest) { - const email = req.nextUrl.searchParams.get("email"); - const artistId = req.nextUrl.searchParams.get("artistId"); - try { - const { data: found } = await supabase - .from("accounts") - .select("*") - .eq("email", email); - - if (found?.length) { - const artistIds = found[0].artistIds; - if (artistIds.includes(artistId)) - return Response.json({ success: true }, { status: 200 }); - await supabase - .from("accounts") - .update({ - ...found[0], - artistIds: [...artistIds, artistId], - }) - .eq("id", found[0].id); - return Response.json({ success: true }, { status: 200 }); - } - return Response.json({ message: "Not found account." }, { status: 400 }); - } catch (error) { - console.error(error); - const message = error instanceof Error ? error.message : "failed"; - return Response.json({ message }, { status: 400 }); - } -} - -export const dynamic = "force-dynamic"; -export const fetchCache = "force-no-store"; -export const revalidate = 0;