const express = require('express');
const router = express.Router();
const { login, register, logout, checkSession } = require('../controllers/authController');
const { requireAuth } = require('../middleware/auth');

router.post('/login', login);
router.post('/register', register);
router.post('/logout', requireAuth, logout);
router.get('/session', checkSession);

module.exports = router;
