Download src/app/api/coach/performance/route.ts from NAP1320/RotNot: direct link, hf CLI and curl.
- Browser
- Download file 576 Bytes
-
https://huggingface.co/spaces/NAP1320/RotNot/resolve/main/src/app/api/coach/performance/route.ts
- Command line
-
hf download hf://spaces/NAP1320/RotNot/src/app/api/coach/performance/route.ts
-
curl -L -o route.ts https://huggingface.co/spaces/NAP1320/RotNot/resolve/main/src/app/api/coach/performance/route.ts
576 Bytes
| import { NextResponse } from "next/server"; | |
| import { withApiError } from "@/lib/api-error"; | |
| import { getPerformanceSummary } from "@/lib/performance"; | |
| /** | |
| * GET /api/coach/performance | |
| * | |
| * Returns a performance summary for the Active Coach feature: | |
| * - Per-category: success rate, attempt count, avg score, trend | |
| * - Overall score, streak data, activity count, active days | |
| * | |
| * Part 1 of the Active Coach roadmap (Issue #5). | |
| */ | |
| export const GET = withApiError(async () => { | |
| const summary = await getPerformanceSummary(1); | |
| return NextResponse.json(summary); | |
| }); | |