const express = require('express');
const router = express.Router();
const { register, login, logout } = require('../controllers/user');
const { jwtAuth } = require('../middleware/jwt');

// 用户注册
router.post('/user/register', register);

// 用户登录
router.post('/user/login', login);

// 用户退出
router.post('/user/logout', jwtAuth, logout);

module.exports = router;