import { Router } from 'express';
import { requireAuth } from '../middleware/auth';
import { searchPrecedents, getPrecedentDocument, analyzePrecedents, cachePrecedentDocument } from '../controllers/precedent.controller';

const router = Router();

router.post('/search-precedents', searchPrecedents);
router.get('/precedent-document/:documentId', getPrecedentDocument);
router.post('/precedent-analysis', requireAuth, analyzePrecedents);
router.post('/cache-precedent', cachePrecedentDocument);

export default router;
