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); });