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

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

const controller = require('../controllers/devicesController');
const authMiddleware = require("../middlewares/authMiddleware");

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;