/**
 * @file presetsRoutes.js
 * @author Radim Buráň (xburan03@stud.fit.vutbr.cz)
 */

const express = require('express');
const router = express.Router();

const dataController = require('../controllers/presetDataController');
const controller = require("../controllers/presetsController");
const authMiddleware = require("../middlewares/authMiddleware");

router.get('/data/', [authMiddleware], dataController.getByFilter);
router.patch('/data/', [authMiddleware], dataController.patch);
router.get('/data/:id', dataController.getByID);

router.get('/', [authMiddleware], controller.getByFilter);
router.post('/', [authMiddleware], controller.post);
router.patch('/', [authMiddleware], controller.patch);
router.get('/my', [authMiddleware], controller.getMy);

router.get('/:id', controller.getByID);
router.delete('/:id', [authMiddleware], controller.deleteByID);

module.exports = router;