Next.js app with a browser-side buttplug/buttplug-wasm control layer (server never touches real-time device commands), SQLite storage via Drizzle, single-secret auth, recordings/replay with device remapping, a usage stats dashboard, Docker deployment, and Gitea CI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8WkFF5ppURBAB918593Eb
10 lines
421 B
TypeScript
10 lines
421 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { getSessionTimeline } from "@/lib/db/queries/stats";
|
|
|
|
export async function GET(req: Request, { params }: { params: Promise<{ id: string }> }) {
|
|
const { id } = await params;
|
|
const bucketMs = Number(new URL(req.url).searchParams.get("bucketMs") ?? 1000);
|
|
const timeline = await getSessionTimeline(Number(id), bucketMs);
|
|
return NextResponse.json({ timeline });
|
|
}
|