authRouter.js
422 Bytes
const express = require ('express');
const router = express.Router();
const authController = require ('../controllers/authController')
const { guestOnly, memberOnly, adminOnly } = require ('../middlewares/auth')
router.post('/login', guestOnly, authController.login)
router.post('/user/info', memberOnly, authController.userInfo)
router.post('/admin_test', adminOnly, authController.adminTest)
module.exports = router