anitab-org / anitab-org/mentorship-backend
Improve GET (...)/comments response to include user.name and sent_by_me
- Dominant language
- Python
- Stars
- 200
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
## Description
As a frontend developer,
I need to have more information about the user who commented on a task,
so that I can display information as the user's name.
The idea is to improve the response of POST (...)/comments API to provide user `name` and `sent_by_me` boolean.
## Mocks
Instead of having:
```
{
"id": 0,
"user_id": 0,
"task_id": 0,
"relation_id": 0,
"creation_date": 0,
"modification_date": 0,
"comment": "string"
}
```
Have something like:
```
{
"id": 0,
"sent_by_me": true,
"user": {
"id": 0,
"name": "string"
},
"task_id": 0,
"relation_id": 0,
"creation_date": 0,
"modification_date": 0,
"comment": "string"
}
```
where `author` is the person who commented.
## Acceptance Criteria
### Update [Required]
- [ ] Update the response
- [ ] Update and write new unit tests
## Definition of Done
- [ ] All of the required items are completed.
- [x] Approval by 1 mentor.
## Estimation
4 hours
Contributor guide
Assessment
This issue has not been assessed yet.