anitab-org / anitab-org/mentorship-backend

Improve GET (...)/comments response to include user.name and sent_by_me

未关闭
#685 33 条评论 0 个 reaction 已指派 1 人 已被 @RiddhiAthreya 认领 在 GitHub 查看
Category: Coding Type: Enhancement
主要语言
Python
星标
200
派生
449
PR 合并指标
30 天内没有已合并 PR

描述

## 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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。