Files
lagos-back/src/routes/index.ts
T
mstfyldz 7b354d4f96 feat: add DELETE /api/cases/:caseId to fully delete a case
Chat panel's trash icon should remove the whole case (not just clear
its chat history) — documents/analyses/chat_messages cascade-delete
via the existing ON DELETE CASCADE foreign keys.
2026-08-09 10:26:36 +03:00

19 lines
573 B
TypeScript

import { Router } from 'express';
import documentRoutes from './document.routes';
import chatRoutes from './chat.routes';
import precedentRoutes from './precedent.routes';
import caseRoutes from './case.routes';
const router = Router();
router.get('/health', (req, res) => {
res.json({ status: 'ok', message: 'AyrisLegal Backend is running' });
});
router.use('/documents', documentRoutes);
router.use('/chat', chatRoutes);
router.use('/cases', caseRoutes);
router.use('/', precedentRoutes); // Keeps the same paths like /api/search-precedents
export default router;