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

Bug: change category POST endpoint

Open
#124 2 comments 0 reactions 0 assignees View on GitHub
Category: Coding Open Source Hack Status: Available Type: Bug
Dominant language
Python
Stars
13
Forks
48
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.