import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
import { readCookieFromHeader } from "@/lib/auth/cookie";
import { verifySession } from "@/lib/auth/session";

export async function GET(req: NextRequest) {
  const token = readCookieFromHeader(req.headers.get("cookie"));
  return NextResponse.json({ authenticated: verifySession(token) });
}
