auth.routes.js 343 Bytes
Newer Older
이재연's avatar
이재연 committed
1
2
3
4
5
import express from "express";
import authCtrl from '../controllers/auth.controller.js';

const router = express.Router()

이재연's avatar
이재연 committed
6
router.route('/login')
이재연's avatar
이재연 committed
7
    .post(authCtrl.login)
이재연's avatar
이재연 committed
8

이재연's avatar
zz    
이재연 committed
9
router.route('/logout')
이재연's avatar
이재연 committed
10
     .get(authCtrl.logout)
이재연's avatar
이재연 committed
11

이재연's avatar
이재연 committed
12
13
14
15
16
router.route('/admin/:admin')
    .post(authCtrl.admin)

router.param('admin',authCtrl.adminId)

이재연's avatar
이재연 committed
17
export default router