Files
cotizador/src/app/api/auth/me/route.ts
T
2026-06-10 02:04:37 -06:00

11 lines
301 B
TypeScript

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