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

createQuestion, Profile UI 수정

parent 8b8c6f9c
import express from "express"; import express from "express";
import { authCtrl, surveyCtrl } from "../controllers"; import { authCtrl, surveyCtrl, questionCtrl } from "../controllers";
const router = express.Router(); const router = express.Router();
router.route("/").get(authCtrl.requireLogin, surveyCtrl.getSurveys); router.route("/").get(authCtrl.requireLogin, surveyCtrl.getSurveys);
router.route("/:surveyId").get(surveyCtrl.getSurveyById);
router.route("/create").post(authCtrl.requireLogin, surveyCtrl.createSurvey); router.route("/create").post(authCtrl.requireLogin, surveyCtrl.createSurvey);
router router
.route("/edit/:surveyId") .route("/edit/:surveyId")
...@@ -17,6 +19,10 @@ router ...@@ -17,6 +19,10 @@ router
surveyCtrl.deleteSurvey surveyCtrl.deleteSurvey
); );
router
.route("/:surveyId/questions")
.post(authCtrl.requireLogin, questionCtrl.createQuestion);
router.param("surveyId", surveyCtrl.userBySurveyId); router.param("surveyId", surveyCtrl.userBySurveyId);
export default router; 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