Commit de41c36d authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

createQuestion, Profile UI 수정

parent 8b8c6f9c
import express from "express";
import { authCtrl, surveyCtrl } from "../controllers";
import { authCtrl, surveyCtrl, questionCtrl } from "../controllers";
const router = express.Router();
router.route("/").get(authCtrl.requireLogin, surveyCtrl.getSurveys);
router.route("/:surveyId").get(surveyCtrl.getSurveyById);
router.route("/create").post(authCtrl.requireLogin, surveyCtrl.createSurvey);
router
.route("/edit/:surveyId")
......@@ -17,6 +19,10 @@ router
surveyCtrl.deleteSurvey
);
router
.route("/:surveyId/questions")
.post(authCtrl.requireLogin, questionCtrl.createQuestion);
router.param("surveyId", surveyCtrl.userBySurveyId);
export default router;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment