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.
19 lines
573 B
TypeScript
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;
|