Skip to content

Commit

Permalink
fix: q uestionDetail 응답 구조 변경 반영 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyosin-Jang committed Nov 13, 2023
1 parent 81002fc commit 074c73e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/category/question/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ export default function CategoryQuestionPage({
break;
// 등록된 답변이 있는 경우
case 'put':
data = await putAnswer(answerDetail[0].answerId, answer);
data = await putAnswer(answerDetail.answerId, answer);
break;
}
return data;
} catch (e) {}
};

const submitAnswer = ({ answer }: any) => {
const submitAnswer = async ({ answer }: any) => {
const method = answerDetail?.content?.length > 0 ? 'put' : 'post';
sendAnswer(answer, method);
await sendAnswer(answer, method);

router.push(`/category/result/${params.id}`);
};
Expand Down

0 comments on commit 074c73e

Please sign in to comment.