- Replace stub analytics.repository.ts with real PostgreSQL queries using pg.Pool - Add /api/guilds, /api/config, /api/auth/login, /api/ui-state (GET/POST) - Add /api/review, /api/recordings, /api/analysis/search - Add /api/messages/:id/reanalyze endpoint - Add /api/analytics/heatmap and /api/analytics/topics - Implement media routes (stub responses, backend has no Discord voice client) - Add WebSocket server at /ws with heartbeat and broadcast functions - Fix analytics route paths to match frontend contract (dual paths for backward compat) - Export getPool() from database module for raw SQL queries - Register all new routers in app.ts Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
375 B
TypeScript
17 lines
375 B
TypeScript
import type { Router } from "express";
|
|
import express from "express";
|
|
import { config } from "../../shared/config/index.js";
|
|
|
|
export function createConfigRouter(): Router {
|
|
const router = express.Router();
|
|
|
|
// GET /api/config
|
|
router.get("/config", (_req, res) => {
|
|
res.json({
|
|
monitorGuildId: config.MONITOR_GUILD_ID || null,
|
|
});
|
|
});
|
|
|
|
return router;
|
|
}
|