- Moved hydration module back from _deprecated (needed for product_refresh) - Restored product_refresh handler for processing stored payloads - Restored geolocation service for findadispo/findagram - Stubbed system routes that depend on deprecated SyncOrchestrator - Removed crawler-sandbox route (deprecated) - Fixed all TypeScript compilation errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
/**
|
|
* 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;
|
|
}
|