ecommerce-express-utils
Version:
A collection of handy express utilities for ecommerce
25 lines (16 loc) • 595 B
JavaScript
import { getVats, setVat, updateVat, getSingleVat, archiveVat, getVatsWithQuery } from './vatController.js';
function vatsRoutes({ router, model }) {
router.route('/getVats')
.get(getVats({ model }))
router.route('/createVat')
.post(setVat({ model }));
router.route('/singleVat/:id')
.patch(updateVat({ model }))
.get(getSingleVat({ model }));
router.route('/archiveVat/:id')
.patch(archiveVat({ model }));
router.route('/getVatsWithQuery')
.get(getVatsWithQuery({ model }))
return router;
};
export { vatsRoutes }