13 lines
319 B
TypeScript
13 lines
319 B
TypeScript
|
import { getServerSession } from "next-auth";
|
||
|
import { authOptions } from "@/app/lib/auth";
|
||
|
import { NextResponse } from "next/server";
|
||
|
|
||
|
export async function GET(request: Request) {
|
||
|
const session = await getServerSession(authOptions);
|
||
|
|
||
|
return NextResponse.json({
|
||
|
authenticated: !!session,
|
||
|
session,
|
||
|
});
|
||
|
}
|