Commit 7eaacfc8 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

세부사항 수정 0713

parent 80ab8493
...@@ -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,
......
...@@ -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) {
......
...@@ -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;
......
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