updates for contacts & tenders Modules
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user