user.route.ts 293 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
2
3
4
5
6
7
8
import express from "express";
import { userCtrl, authCtrl } from "../controllers";

const router = express.Router();

router
  .route("/")
  .get(authCtrl.requireLogin, userCtrl.getUsers)
Yoon, Daeki's avatar
Yoon, Daeki committed
9
  .post(authCtrl.requireLogin, authCtrl.hasRole("admin"), userCtrl.createUser);
Yoon, Daeki's avatar
Yoon, Daeki committed
10
11

export default router;