12 lines
533 B
JavaScript
12 lines
533 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { getAllContactPersons, createContactPerson, updateContactPerson, deleteContactPerson } = require('../controllers/contactPersonController');
|
|
const authMiddleware = require('../middleware/authMiddleware')
|
|
|
|
router.get('/', authMiddleware, getAllContactPersons);
|
|
router.post('/', authMiddleware, createContactPerson);
|
|
router.put('/:id', authMiddleware, updateContactPerson);
|
|
router.delete('/:id', authMiddleware, deleteContactPerson);
|
|
|
|
module.exports = router;
|