const express = require('express');
const router = express.Router();
const ctrl = require('../controllers/itemAliasController');
const { createRequirePage } = require('../../../shared/middleware/pagePermission');
const { getDb } = require('../dbPool');
const requirePage = createRequirePage(getDb);

router.get('/', requirePage('factory_purchases'), ctrl.getAll);
router.post('/', requirePage('factory_purchases'), ctrl.create);
router.delete('/:id', requirePage('factory_purchases'), ctrl.delete);

module.exports = router;
