1
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getSession } from "@/lib/auth";
|
||||
|
||||
export async function GET() {
|
||||
const session = await getSession();
|
||||
if (!session) {
|
||||
return NextResponse.json({ error: "No autenticado" }, { status: 401 });
|
||||
}
|
||||
return NextResponse.json({ user: session });
|
||||
}
|
||||
Reference in New Issue
Block a user