const express = require('express');
const salesControllers = require('../../controllers/admin/SalesController.js');
const verifyJWT = require('../../middleware/VerifyJWT.js');
const checkRole = require('../../middleware/CheckRole.js');

const router = express.Router();

router.post('/', verifyJWT, checkRole(['admin']), salesControllers.storeSales);
router.get('/', verifyJWT, checkRole(['admin']), salesControllers.getAllSales);
router.get('/:id', verifyJWT, checkRole(['admin']), salesControllers.showSales);
router.patch('/:id', verifyJWT, checkRole(['admin']), salesControllers.updateSales);
router.delete('/:id', verifyJWT, checkRole(['admin']), salesControllers.deleteSales);

module.exports = router;