anitab-org / anitab-org/stem-diverse-tv

Bug: change category POST endpoint

未关闭
#124 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Category: Coding Open Source Hack Status: Available Type: Bug
主要语言
Python
星标
13
派生
48
PR 合并指标
30 天内没有已合并 PR

描述

### Describe the bug
Currently, when we create a category, we got the message `Category added`. It would be more beneficial to return the created object. Also, we provide the title of the category as the query string, we should send the data in the body.
### To Reproduce
Steps to reproduce the behavior:
1. Go to POST `/categories/`
2. Populate the payload fields
3. See the response message (if the action went successful)

### Expected behavior
Instead of returning a message, return the representation of the created object. Correct the implementation of the POST endpoint, send the data in the body.

### Screenshots
If applicable, add screenshots to help explain your problem.
![image](https://user-images.githubusercontent.com/16724101/110525400-d357ae80-8114-11eb-9997-bc6e743678f4.png)
![image](https://user-images.githubusercontent.com/16724101/110526101-afe13380-8115-11eb-8334-c5b296099fe8.png)

### Desktop (please complete the following information):
- OS: elementary OS 5.1.7 Hera (built on Ubuntu)
- Browser: Google Chrome
- Version: 88.0.4324.182

### Additional context
N/A

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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