Commit 6262a322 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

createSurvey 오류

parent 4a36252e
...@@ -14,6 +14,7 @@ export const createSurvey = asyncWrap( ...@@ -14,6 +14,7 @@ export const createSurvey = asyncWrap(
let survey = req.body; let survey = req.body;
survey.user = userId; survey.user = userId;
console.log("survey body", survey); console.log("survey body", survey);
delete survey._id;
const newSurvey = await surveyDb.createSurvey(survey); const newSurvey = await surveyDb.createSurvey(survey);
return res.json(newSurvey); return res.json(newSurvey);
} }
...@@ -67,4 +68,4 @@ export const userBySurveyId = async ( ...@@ -67,4 +68,4 @@ export const userBySurveyId = async (
error.message || "설문조사를 작성한 사용자를 찾아내는 중 오류 발생" error.message || "설문조사를 작성한 사용자를 찾아내는 중 오류 발생"
); );
} }
}; };
\ No newline at end of file
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