@@ -0,0 +1,10 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getServerSession } from "@/lib/auth";
|
||||
|
||||
export async function GET() {
|
||||
const session = await getServerSession();
|
||||
if (!session) {
|
||||
return NextResponse.json({ user: null });
|
||||
}
|
||||
return NextResponse.json({ user: { id: session.id, nickname: session.nickname, isAdmin: session.isAdmin } });
|
||||
}
|
||||
Reference in New Issue
Block a user