Skip to content

Commit

Permalink
댓글 추가가 되지 않는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seungha-kim committed Nov 7, 2018
1 parent a03e846 commit 4f4f5e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ async function drawPostDetail(postId) {
commentFormEl.addEventListener('submit', async e => {
e.preventDefault()
const body = e.target.elements.body.value
await api.post(`/posts/${postId}/comments`, {
await api.post(`/comments`, {
postId,
body
})
drawPostDetail(postId)
Expand Down

0 comments on commit 4f4f5e3

Please sign in to comment.