Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : Vrai-Prix8 * File : src/app/api/stats/catalog/route.ts9 * Module : app10 * Repository : https://git.spboucher.ai/vrai-prix11 * Created : 2026-08-2312 * Last Modified : 2026-08-2313 *14 * Author : Simon-Pierre Boucher15 * Position : Professor of Finance16 * Institution : Université du Québec en Outaouais (UQO)17 * Organization : SP Boucher18 * Website : https://spboucher.ai19 * Git : https://git.spboucher.ai20 *21 * Preferred Contact: contact@spboucher.ai22 * Development : dev@spboucher.ai23 * Support : support@spboucher.ai24 * Security/Admin : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142/**43 * GET /api/stats/catalog — v3 : blocs composables pour le constructeur de44 * rapports personnalisés. Dérivé du dashboard45 * (instantané du rôle 2026 — period accepté mais non applicable).46 */47import { NextResponse } from "next/server";48import { catalogFromDashboard } from "@/lib/report-stats";49import { getDashboard } from "@/lib/stats-dashboard";5051export async function GET() {52 const dash = getDashboard();53 return NextResponse.json(54 { updated: dash.updated ?? null, period: dash.period ?? null,55 blocks: catalogFromDashboard(dash) },56 { headers: { "Cache-Control": "public, max-age=300" } },57 );58}59