feat(backend): implement all missing endpoints, real analytics queries, and WebSocket server
- 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>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
5a094c926a
commit
9b41eb9c12
@@ -1,14 +1,26 @@
|
||||
import type { Router } from "express";
|
||||
import express from "express";
|
||||
import {
|
||||
handleConnectVoice,
|
||||
handleDisconnectVoice,
|
||||
handleGetVoiceChannels,
|
||||
handleGetVoiceStatus,
|
||||
} from "./voice.controller.js";
|
||||
|
||||
export function createVoiceRouter(): Router {
|
||||
const router = express.Router();
|
||||
|
||||
// TODO: Implement voice routes
|
||||
// GET /api/voice/recordings
|
||||
// GET /api/voice/recordings/:userId
|
||||
// POST /api/voice/connect
|
||||
// POST /api/voice/disconnect
|
||||
// GET /api/status
|
||||
router.get("/status", handleGetVoiceStatus);
|
||||
|
||||
// POST /api/connect
|
||||
router.post("/connect", handleConnectVoice);
|
||||
|
||||
// POST /api/disconnect
|
||||
router.post("/disconnect", handleDisconnectVoice);
|
||||
|
||||
// GET /api/guilds/:guildId/voice-channels
|
||||
router.get("/guilds/:guildId/voice-channels", handleGetVoiceChannels);
|
||||
|
||||
return router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user