API ReferencePosts
POST /posts/{postId}/comments
Adicionar comentário ao post
POST
/posts/{postId}/commentsAuth: accessTokenINSERT comment. Dispara notificação post_comment ao dono do post (se autor != dono).
Request
| Campo | Tipo | Requerido | Descrição |
|---|---|---|---|
| content | string | sim |
Response
200
Sem corpo na resposta.
Erros
Sem respostas de erro documentadas.
Exemplos
curl -X POST 'http://localhost:3003/posts/{postId}/comments' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer SEU_ACCESS_TOKEN' \
-d '{}'await fetch('http://localhost:3003/posts/{postId}/comments', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + accessToken,
},
body: JSON.stringify({}),
})