SPB Git

spb/autoscholar

Public
476 B · 17 lines typescript
1import { handler, json } from "@/lib/server/api";2import { currentSession } from "@/lib/server/session";34export const runtime = "nodejs";56export const GET = handler(async () => {7  const s = await currentSession();8  if (!s) return json({ authenticated: false }, { status: 401 });9  return json({10    authenticated: true,11    username: s.username,12    mustChangePassword: s.mustChangePassword,13    csrfToken: s.csrfToken,14    expiresAt: s.expiresAt.toISOString(),15  });16});17
Files · main
Menu

Theme