From b337d1ff10901e79038688aecf960e60623698f4 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Thu, 23 Apr 2026 10:51:43 +0200 Subject: [PATCH] feat: add pg-ff-client to replace HTTP API calls with direct PostgreSQL bulk queries --- src/lib/pg-ff-client.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/lib/pg-ff-client.ts b/src/lib/pg-ff-client.ts index d9108cd..4f6908b 100644 --- a/src/lib/pg-ff-client.ts +++ b/src/lib/pg-ff-client.ts @@ -550,13 +550,6 @@ interface ApiPerfDashboard { * N-1 : même jour de semaine (52 semaines = 364 jours avant hier). */ export async function pgGetDashboardData(): Promise { - try { - const sampleResult = await pgNoParallel(sql`SELECT codein, no_id FROM articles LIMIT 5`); - require('fs').writeFileSync('c:/GIT/CollectFlow/scripts/db-sample.json', JSON.stringify(sampleResult.rows, null, 2)); - } catch (e: any) { - require('fs').writeFileSync('c:/GIT/CollectFlow/scripts/db-sample.json', JSON.stringify({error: e.message})); - } - const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1); const dateHier = yesterday.toISOString().split("T")[0];