Skip to content
Snippets Groups Projects
user.js 613 B
Newer Older
Bastien's avatar
Bastien committed
const express = require('express');
const router = express.Router();
const controller = require('../controllers/userController');
const recommandationController = require('../controllers/recommendation');
Bastien's avatar
Bastien committed
const auth = require('../middlewares/auth');

Bastien's avatar
Bastien committed
router.get('/',auth.auth,controller.getUserInformations);
Bastien's avatar
Bastien committed

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

router.post('/signup', controller.signup);

router.get('/logout',auth.auth,controller.logout);
Bastien's avatar
Bastien committed

Bastien's avatar
Bastien committed
router.put('/',auth.auth,controller.changeUserInfos);

router.get('/recommandation',auth.auth,recommandationController.getRecommandations);

Bastien's avatar
Bastien committed

module.exports = router;