globalRouter.js 656 Bytes
Newer Older
KangMin An's avatar
KangMin An committed
1
2
import express from "express";
import routes from "../routes";
3
import { getHome } from "../controllers/globalController";
4
import {
5
  getConfirm,
6
7
8
9
10
  getLogin,
  getSignup,
  postLogin,
  postSignup,
} from "../controllers/userController";
KangMin An's avatar
KangMin An committed
11
12
13

const globalRouter = express.Router();

14
globalRouter.get("/", getHome); // For development test.
KangMin An's avatar
KangMin An committed
15

16
17
18
19
20
// Authentication
globalRouter.get(routes.signup, getSignup); // For development test.
globalRouter.get(routes.login, getLogin); // For development test.
globalRouter.post(routes.signup, postSignup);
globalRouter.post(routes.login, postLogin);
21
globalRouter.get(routes.confirm, getConfirm);
22

KangMin An's avatar
KangMin An committed
23
export default globalRouter;