Files
BaraBingo/app/api/auth/me/route.ts
SlavaVlad 05677924b5
Some checks failed
Deploy / build-and-deploy (push) Failing after 2m53s
V1 bingo
2026-06-14 21:29:43 +03:00

11 lines
348 B
TypeScript

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 } });
}