const express = require('express');
const NotificationErrorSparepartController = require('../controllers/notification_error_sparepart.controller');
const verifyToken = require('../middleware/verifyToken');
const verifyAccess = require('../middleware/verifyAccess');

const router = express.Router();

// ===========================
// Notification Erro rSparepart Routes
// ===========================

router
  .route('/')
  .get(verifyToken.verifyAccessToken, NotificationErrorSparepartController.getAll)
  .post(verifyToken.verifyAccessToken, verifyAccess(), NotificationErrorSparepartController.create);

router
  .route('/:id')
  .get(verifyToken.verifyAccessToken, NotificationErrorSparepartController.getById)
  .put(verifyToken.verifyAccessToken, verifyAccess(), NotificationErrorSparepartController.update)
  .delete(verifyToken.verifyAccessToken, verifyAccess(), NotificationErrorSparepartController.delete);

module.exports = router;
