Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
de41c36d
Commit
de41c36d
authored
Jul 18, 2022
by
Jiwon Yoon
Browse files
createQuestion, Profile UI 수정
parent
8b8c6f9c
Changes
21
Hide whitespace changes
Inline
Side-by-side
src/routes/survey.route.ts
View file @
de41c36d
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
;
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment