const express = require('express');
const router = express.Router();
const { getAllContactPersons, createContactPerson, updateContactPerson, deleteContactPerson, filterContactPersons } = require('../controllers/contactPersonController');
const authMiddleware = require('../middleware/authMiddleware');

router.get('/', getAllContactPersons);
router.post('/', authMiddleware, createContactPerson);
router.put('/:id', authMiddleware, updateContactPerson);
router.delete('/:id', authMiddleware, deleteContactPerson);
router.post('/filter', filterContactPersons); 

module.exports = router;
