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
7eaacfc8
Commit
7eaacfc8
authored
Jul 13, 2022
by
Jiwon Yoon
Browse files
세부사항 수정 0713
parent
80ab8493
Changes
3
Show whitespace changes
Inline
Side-by-side
frontend/src/profile/Profile.tsx
View file @
7eaacfc8
...
@@ -12,7 +12,6 @@ export const Profile = () => {
...
@@ -12,7 +12,6 @@ export const Profile = () => {
questions
:
[],
questions
:
[],
});
});
async
function
createSurvey
()
{
async
function
createSurvey
()
{
// 먼저 서버에 survey 테이블에 새로운 survey 항목 추가 로직 필요
const
newSurvey
:
SurveyType
=
await
surveyApi
.
createSurvey
(
survey
);
const
newSurvey
:
SurveyType
=
await
surveyApi
.
createSurvey
(
survey
);
navigate
(
`/surveys/edit/
${
newSurvey
.
_id
}
`
,
{
navigate
(
`/surveys/edit/
${
newSurvey
.
_id
}
`
,
{
replace
:
true
,
replace
:
true
,
...
...
frontend/src/questions/Question.tsx
View file @
7eaacfc8
...
@@ -43,6 +43,7 @@ export const Question = ({
...
@@ -43,6 +43,7 @@ export const Question = ({
element
element
);
);
console
.
log
(
newQuestion
);
console
.
log
(
newQuestion
);
changeCurrentId
(
""
);
// setSuccess(true);
// setSuccess(true);
// setError("");
// setError("");
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
src/models/question.model.ts
View file @
7eaacfc8
...
@@ -2,7 +2,7 @@ import { model, ObjectId, Schema, Types } from "mongoose";
...
@@ -2,7 +2,7 @@ import { model, ObjectId, Schema, Types } from "mongoose";
export
interface
IQuestion
{
export
interface
IQuestion
{
_id
?:
Types
.
ObjectId
;
_id
?:
Types
.
ObjectId
;
user
:
Types
.
ObjectId
;
user
?
:
Types
.
ObjectId
;
type
:
string
;
type
:
string
;
title
?:
string
;
title
?:
string
;
isRequired
:
boolean
;
isRequired
:
boolean
;
...
...
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