feat: accreditation crud
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import express from 'express';
|
||||
|
||||
import {
|
||||
createAccreditation,
|
||||
getAccreditations,
|
||||
getActiveAccreditations,
|
||||
getAccreditation,
|
||||
updateAccreditation,
|
||||
deleteAccreditation,
|
||||
} from '../controllers/accreditation.controller.js';
|
||||
|
||||
import jwtAuthMiddleware from '../middleware/auth.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/active', getActiveAccreditations);
|
||||
|
||||
router.post('/', jwtAuthMiddleware, createAccreditation);
|
||||
router.get('/getAll', jwtAuthMiddleware, getAccreditations);
|
||||
router.get('/:id', jwtAuthMiddleware, getAccreditation);
|
||||
router.put('/:id', jwtAuthMiddleware, updateAccreditation);
|
||||
router.delete('/:id', jwtAuthMiddleware, deleteAccreditation);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user