Some checks failed
Build pitch-deck / build-push-deploy (push) Successful in 1m8s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Failing after 9s
CI / test-python-voice (push) Failing after 27s
CI / test-bqas (push) Failing after 27s
All KPI numbers on the AI Pipeline slide now load from the pitch_pipeline_stats table via /api/pipeline-stats: - Legal sources: 380+ (was hardcoded 75+) - Unique controls: 25k+ (was 70k+) - Obligations: 47k+ (from DB) - EU regulations, DACH laws, frameworks: from DB - Pipeline steps text: all counts dynamic Numbers can be updated via SQL without code deploy: UPDATE pitch_pipeline_stats SET value = X WHERE key = 'legal_sources'; Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
572 B
TypeScript
18 lines
572 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import pool from '@/lib/db'
|
|
|
|
export async function GET() {
|
|
try {
|
|
const { rows } = await pool.query(
|
|
'SELECT key, value, label_de, label_en FROM pitch_pipeline_stats ORDER BY key'
|
|
)
|
|
const stats: Record<string, { value: number; label_de: string; label_en: string }> = {}
|
|
for (const row of rows) {
|
|
stats[row.key] = { value: Number(row.value), label_de: row.label_de, label_en: row.label_en }
|
|
}
|
|
return NextResponse.json(stats)
|
|
} catch {
|
|
return NextResponse.json({}, { status: 500 })
|
|
}
|
|
}
|