feat: add DELETE /api/chat/:caseId to clear a case's chat history

Frontend's chat history trash icon was calling this endpoint but it
didn't exist yet, causing a JSON-parse error on the default 404 page.

Also renames the LegalOS health-check message to AyrisLegal.
This commit is contained in:
mstfyldz
2026-08-09 10:09:15 +03:00
parent b030bdaa60
commit 0831ebb25b
3 changed files with 21 additions and 2 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
import { Router } from 'express';
import { requireAuth } from '../middleware/auth';
import { chatMessage } from '../controllers/chat.controller';
import { chatMessage, deleteChatHistory } from '../controllers/chat.controller';
const router = Router();
router.post('/:caseId/message', requireAuth, chatMessage);
router.delete('/:caseId', requireAuth, deleteChatHistory);
export default router;