Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject invalid cost number format #6

Open
noqqe opened this issue Jan 7, 2019 · 2 comments
Open

Reject invalid cost number format #6

noqqe opened this issue Jan 7, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@noqqe
Copy link
Member

noqqe commented Jan 7, 2019

Hi,

I create drinks with

items_client.items_post(name, cost)

cost does not seem to have effect. I specify 100 (1 Euro in cents) and it results in 0 in the backend.

Can you have a look?

@noqqe noqqe added the bug Something isn't working label Jan 7, 2019
@noqqe
Copy link
Member Author

noqqe commented Jan 7, 2019

This is not a bug anymore. Its just not-so-nice behaviour.

I posted a float(100) and not a int(100) and the API silently accepted my request with 200 but did not change the value.

So if you like, you may want to throw an error message if the type of the input is not correct.

@noqqe noqqe added enhancement New feature or request and removed bug Something isn't working labels Jan 7, 2019
@winterMate
Copy link
Collaborator

Hm, right, the API is specified to accept only int, but it is not enforced ...

@winterMate winterMate changed the title When creating a drink, cost does not have effect Reject invalid cost number format Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants