const express = require('express');
const router = express.Router();
const auth = require('../middleware/auth');
const { getCustomers, getCustomer, addCustomer, updateCustomer, deleteCustomer } = require('../controllers/customerController');

router.get('/', auth, getCustomers);
router.get('/:id', auth, getCustomer);
router.post('/', auth, addCustomer);
router.put('/:id', auth, updateCustomer);
router.delete('/:id', auth, deleteCustomer);

module.exports = router;
