Skip to content

Commit

Permalink
fix : id를 surveyId로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jjinbok committed Jan 18, 2024
1 parent 6a1c6a2 commit 1bd1f06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/controller/surveyAnswered.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ const surveyAnswered = async (req, res) => {

// surveys를 응답으로 보내기
res.json({
surveys: surveys.map((survey) => survey.dataValues),
surveys: surveys.map((survey) => { survey.dataValues.surveyId = survey.dataValues.id;
delete survey.dataValues.id;
return {
surveyId: survey.dataValues.surveyId,
...survey.dataValues,
};}),
totalPages,
});
} else {
Expand Down

0 comments on commit 1bd1f06

Please sign in to comment.