File size: 576 Bytes
9580dce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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);
});
|