/** * System API Routes (Stub) * * The full system routes depend on SyncOrchestrator which was moved to _deprecated. * This stub provides empty routers to maintain backward compatibility. * * Full implementation available at: src/_deprecated/system/routes/index.ts */ import { Router, Request, Response } from 'express'; import { Pool } from 'pg'; import { MetricsService } from '../services'; export function createSystemRouter(_pool: Pool): Router { const router = Router(); // Stub - full sync/dlq/integrity/fix/alerts routes moved to _deprecated router.get('/status', (_req: Request, res: Response) => { res.json({ message: 'System routes temporarily disabled - see _deprecated/system/routes', status: 'stub', }); }); return router; } export function createPrometheusRouter(pool: Pool): Router { const router = Router(); const metrics = new MetricsService(pool); /** * GET /metrics * Prometheus-compatible metrics endpoint */ router.get('/', async (_req: Request, res: Response) => { try { const prometheusOutput = await metrics.getPrometheusMetrics(); res.set('Content-Type', 'text/plain; version=0.0.4'); res.send(prometheusOutput); } catch (error) { console.error('[Prometheus] Metrics error:', error); res.status(500).send('# Error generating metrics'); } }); return router; }