coder-mind-project/master

Save answer resource needs 'isAuthor' field in response

Closed this issue · 1 comments

Endpoint

/comments/:id

HTTP method:

POST

Current response:

{
  "_id": "5e8f2fca4c390f2ea8a127e7",
  "state": "enabled",
  "confirmedAt": null,
  "readedAt": null,
  "answerOf": "5e8b4e951394cc28c05d86ca",
  "userName": "Allan",
  "userEmail": "allan@codermind.com.br",
  "userId": "5e6a8e15b21a69205a464eda",
  "message": "I like it!",
  "articleId": "5e8b551eecac6a31d6020047",
  "createdAt": "2020-04-09T14:23:06.985Z",
  "updatedAt": "2020-04-09T14:23:06.985Z"
}

Expected behavior:

{
  "_id": "5e8f2fca4c390f2ea8a127e7",
  "state": "enabled",
  "confirmedAt": null,
  "readedAt": null,
  "answerOf": "5e8b4e951394cc28c05d86ca",
  "userName": "Allan",
  "userEmail": "allan@codermind.com.br",
  "userId": "5e6a8e15b21a69205a464eda",
  "message": "I like it!",
  "articleId": "5e8b551eecac6a31d6020047",
  "createdAt": "2020-04-09T14:23:06.985Z",
  "updatedAt": "2020-04-09T14:23:06.985Z",
  "isAuthor": true  // This field is necessary!
}

Resolved!