feat: add case creation endpoint and auto-title from first message
POST /api/cases lets the frontend actually create a new dava dosyası (no working "Yeni Dosya" flow existed before). chatMessage now generates a short title from a case's first message (like Claude/ ChatGPT auto-titling) and renames the case, returned as `newTitle`.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { Router } from 'express';
|
||||
import { requireAuth } from '../middleware/auth';
|
||||
import { deleteCase } from '../controllers/case.controller';
|
||||
import { createCase, deleteCase } from '../controllers/case.controller';
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.post('/', requireAuth, createCase);
|
||||
router.delete('/:caseId', requireAuth, deleteCase);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user