21 lines
636 B
JavaScript

const express = require('express');
const router = express.Router();
const userController = require('../controllers/userController.js');
router.get('/', userController.list);
router.get('/profile', userController.profile);
router.get('/logout', userController.logout);
router.get('/savedLocation', userController.checkLocation);
router.get('/:id', userController.show);
router.post('/', userController.create);
router.post('/login', userController.login);
router.put('/addLocation/:id', userController.addLocation);
router.put('/:id', userController.update);
router.delete('/:id', userController.remove);
module.exports = router;