const express = require('express');
const NotificationController = require('../controllers/notification.controller');
const verifyToken = require('../middleware/verifyToken');
const verifyAccess = require('../middleware/verifyAccess');

const router = express.Router();

// ===========================
// Notification Routes
// ===========================

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

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

module.exports = router;
