import express from 'express'; import { authorize } from '../../middlewares/auth.middleware'; import controller from '../../controllers/v1/path.controller'; import Permissions from '../../../common/utils/Permissions'; const router = express.Router(); router .route('/') .post( authorize([Permissions.USER]), controller.get ); router .route('/create') .post( authorize([Permissions.USER]), controller.create ); router .route('/update') .put( authorize([Permissions.USER]), controller.update ); router .route('/delete') .patch( authorize([Permissions.USER]), controller.delete ); router .route('/download') .put( authorize([Permissions.USER]), controller.download ); router .route('/force-delete') .patch( authorize([Permissions.USER]), controller.forceDelete ); router .route('/delete-multiple') .patch( authorize([Permissions.USER]), controller.deleteMultiple ); export default router;