answer.route.ts 399 Bytes
Newer Older
1
import express from "express";
Jiwon Yoon's avatar
Jiwon Yoon committed
2
import { answerCtrl, authCtrl, fileCtrl, surveyCtrl } from "../controllers";
3
4
5
6

const router = express.Router();

router.route("/").post(fileCtrl.uploadFile, answerCtrl.createAnswers);
Jiwon Yoon's avatar
Jiwon Yoon committed
7
8
9
10
11
router
  .route("/:surveyId")
  .get(authCtrl.requireLogin, authCtrl.authenticate, answerCtrl.getAnswers);

router.param("surveyId", surveyCtrl.userBySurveyId);
12
13

export default router;