const express = require('express');
const router = express.Router();
const { authenticate } = require('../middlewares/auth');
const qaMasterController = require('../controllers/qaMasterController');

router.use(authenticate);

router.get('/meta/options', qaMasterController.getMetaOptions);
router.get('/bom-components/:bomId', qaMasterController.getBOMComponents);
router.get('/', qaMasterController.getAll);
router.get('/:id', qaMasterController.getById);
router.post('/', qaMasterController.create);
router.put('/:id', qaMasterController.update);
router.delete('/:id', qaMasterController.delete);

module.exports = router;

