From db0fd1ca8ff6ac0f30ca0213442f209c5f7fb1dd Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 3 Aug 2025 13:02:07 +0200 Subject: [PATCH] Clean import --- app/api/profile/route.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/api/profile/route.ts b/app/api/profile/route.ts index 8552f140..6d4478e5 100644 --- a/app/api/profile/route.ts +++ b/app/api/profile/route.ts @@ -1,7 +1,5 @@ -import {prisma} from "@/lib/server/prisma"; import {NextResponse} from "next/server"; import {getSession} from "@/lib/server/auth"; -import {notFound, redirect} from "next/navigation"; import {retrieveUser} from "@/lib/server/db-utils"; @@ -10,9 +8,9 @@ export async function GET() { console.log(`Session: ${session?.user?.name}`); if (!session?.user?.id) - return new NextResponse(JSON.stringify({ error: "User not found" }), { + return new NextResponse(JSON.stringify({error: "User not found"}), { status: 404, - headers: { "Content-Type": "application/json" }, + headers: {"Content-Type": "application/json"}, }); const id = session.user.id; @@ -20,9 +18,9 @@ export async function GET() { const user = await retrieveUser(id); if (!user) { - return new NextResponse(JSON.stringify({ error: "User not found" }), { + return new NextResponse(JSON.stringify({error: "User not found"}), { status: 404, - headers: { "Content-Type": "application/json" }, + headers: {"Content-Type": "application/json"}, }); }