Files
Zumri-Backend/app/routes/document.routes.js
T
Sathira Sri Sathara b6b345f245 feat: Implement Phase 2 cross-cutting services with email and notification enhancements
- Refactor email verification and password reset utilities to use new email service.
- Introduce email delivery queue and notification delivery model for better tracking.
- Enhance file validation and storage services for improved security and ownership management.
- Add cron job for cleaning inactive notifications with retention policy.
- Update document worker to handle document generation and storage more efficiently.
- Implement logging improvements in activity and log workers.
- Create comprehensive documentation for new API endpoints and services.
- Add unit tests for file validation and notification policies to ensure robustness.
2026-09-03 14:22:34 +05:30

13 lines
812 B
JavaScript

const router = require("express").Router();
const c = require("../controllers/generateDocument.controller");
const { authenticate } = require("../middleware/auth.middleware");
router.use(authenticate);
router.get("/types", c.getAvailableDocumentTypes);
router.get("/saved", c.getSavedDocuments); router.post("/saved", c.getSavedDocuments);
router.post("/generate", c.generateDocument); router.post("/draft", c.generateDraftDocument);
router.get("/reference-number/:documentType", c.generateReferenceNo);
router.get("/jobs/:jobId", c.getJobStatus); router.get("/job/:jobId/status", c.getJobStatus);
router.get("/:docId/download", c.downloadDocument); router.get("/download/:docId", c.downloadDocument);
router.delete("/job/:jobId", c.cancelJob); router.get("/:docId", c.getDocumentData);
module.exports = router;