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

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

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

router.post('/login', controller.login);
router.post('/register', controller.register);
router.post('/logout', controller.logout);

router.post('/changePassword', [authMiddleware], controller.changePassword);
router.post('/changeEmail', [authMiddleware], controller.changeEmail);

module.exports = router;