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

Bug: change category POST endpoint

Offen
#124 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Category: Coding Open Source Hack Status: Available Type: Bug
Vorherrschende Sprache
Python
Sterne
13
Forks
48
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.