SPB Git forge

spb/toveli

Public
14commits 1branches 0releases
1.1 MBsize
maindefault branch
5 h agolast push
TypeScript 50.6% JavaScript 46.1% SQL 2.1% Shell 0.6% CSS 0.5%
426 B · 6 lines typescript
Raw Blame History
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