TypeScript 50.6%
JavaScript 46.1%
SQL 2.1%
Shell 0.6%
CSS 0.5%
1import { NextResponse } from "next/server";2import { listSessions, requireUser } from "@/lib/auth/session";3import { handle } from "@/lib/api";4export const dynamic = "force-dynamic";5export async function GET() { try { const u = await requireUser(); const rows = await listSessions(u.id); return NextResponse.json({ sessions: rows.map((s) => ({ ...s, current: s.id === u.sessionId })) }); } catch (e) { return handle(e); } }6