Intelligence
Artifacts
Browse the repository, read documents, and manage the governance folders. Source, runtime, and infrastructure are read-only.
Repository
repositories/aaf-holdings/hq01/app/api/sessions/[id]/route.ts
634 B
import { NextResponse } from "next/server";
import { getMetadata, getSession } from "@/lib/sessions/manager";
/**
* Single-session endpoint.
*
* GET /api/sessions/:id → the session record + its immutable metadata.
*/
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export async function GET(
_request: Request,
{ params }: { params: { id: string } },
) {
const session = getSession(params.id);
if (!session) {
return NextResponse.json({ error: "Session not found." }, { status: 404 });
}
const metadata = getMetadata(params.id);
return NextResponse.json({ session, metadata });
}
root · /srv/aaf