You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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;
|