feat: add POST /api/cases/parties to store UYAP taraf bilgileri

The UYAP extension now captures the davaci/davali/sanik + vekil data
from the "Taraf Bilgileri" tab and sends it once per case. This
endpoint finds/creates the matching case by title (same lookup used
by registerLocalDocument, now shared via lib/caseLookup.ts) and stores
it in a new cases.parties column - a much more reliable source for
the case detail screen's "Taraflar" info than the AI's own guess from
OCR'd document text.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
mstfyldz
2026-08-09 19:29:53 +03:00
co-authored by Claude Sonnet 5
parent 9f5c5c1e45
commit 99d4d770d5
4 changed files with 59 additions and 22 deletions
+2 -1
View File
@@ -1,11 +1,12 @@
import { Router } from 'express';
import { requireAuth } from '../middleware/auth';
import { createCase, deleteCase, summarizeCase } from '../controllers/case.controller';
import { createCase, deleteCase, summarizeCase, updateCaseParties } from '../controllers/case.controller';
const router = Router();
router.post('/', requireAuth, createCase);
router.delete('/:caseId', requireAuth, deleteCase);
router.post('/:caseId/summarize', requireAuth, summarizeCase);
router.post('/parties', requireAuth, updateCaseParties);
export default router;