updates for contacts & tenders Modules

This commit is contained in:
yotakii
2026-04-01 15:50:21 +03:00
parent 278d8f6982
commit f101989047
12 changed files with 850 additions and 143 deletions

View File

@@ -28,6 +28,15 @@ const upload = multer({
limits: { fileSize: config.upload.maxFileSize },
});
// View attachment
router.get(
'/attachments/:attachmentId/view',
param('attachmentId').isUUID(),
validate,
tendersController.viewAttachment
)
router.use(authenticate);
// Enum/lookup routes (no resource id) - place before /:id routes
@@ -173,3 +182,14 @@ router.post(
);
export default router;
// Delete attachment
router.delete(
'/attachments/:attachmentId',
authorize('tenders', 'tenders', 'update'),
param('attachmentId').isUUID(),
validate,
tendersController.deleteAttachment
)