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

Create list of available items via API, instead of hardcoding numbers #25

Closed
blarz opened this issue Aug 1, 2019 · 2 comments · Fixed by #37
Closed

Create list of available items via API, instead of hardcoding numbers #25

blarz opened this issue Aug 1, 2019 · 2 comments · Fixed by #37

Comments

@blarz
Copy link
Contributor

blarz commented Aug 1, 2019

At the moment, all items and their corresponding numbers are hardcoded in menu.py (see USER_KEY_CONSUME_*).

We could use the /items GET call, to receive a list of all available items and generate the menu of "consumables" programmatically instead of hardcoding the numbers. Would make heiko more flexible if we add/remove items in the future (think "Pizza" for the CCCamp..).

@blarz
Copy link
Contributor Author

blarz commented Aug 9, 2019

Hardcoding the keys also means, that if your database on the server side doesn't have the exact same item ids as described in menu.py, this will fail.

I'll look into this soon hopefully.

@noqqe
Copy link
Member

noqqe commented Aug 9, 2019

Would really appreciate this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants