feat: implement PostgreSQL bulk data access client to replace per-article HTTP requests

This commit is contained in:
Michael committed 2026-04-03 10:58:43 +02:00
1 parent 83d101ddc1
commit ebd819bfa4
2 files changed
+18 -15

No files matched your search

+5
View File
@@ -7,6 +7,11 @@ import path from "path";
let pool: Pool | null = null;
let currentDb: NodePgDatabase<typeof schema> | null = null;
export function getPool(): Pool {
getDb(); // ensure pool is initialized
return pool!;
}
function maskUrl(url: string | undefined) {
if (!url) return "undefined";
return url.replace(/:([^@]+)@/, ":****@");