hftlclub / node-iltis

Node.js backend for ILTIS
MIT License
1 stars 0 forks source link

Current consumption interface #17

Open ulbricht-inr opened 6 years ago

ulbricht-inr commented 6 years ago

provide a interface to request the current consumption of the open event.. eg. to provide this Information at the infoscreen "You noobs yous just consumed 11 beer today", or "great our stock is 255 beer lower because of you :P"

fmalcher commented 6 years ago

In general, this is possible (of course). however, for big events where we do the "count storage afterwards" method, those numbers are always 0. Even with the incremental method, it only represents what you got from the storage, not what you sold to the guests... Apart from that – I like the idea!

ulbricht-inr commented 6 years ago

yey, it will not bee so accurate... but nice mooving numbers for the guests.... maybe motivating, to drink so much beer that we have to get a nother box from the stock :D

rweisse commented 6 years ago

I would suggest to provide an consumption interface only for the last "big" event like:

/event/intern/last/consumption/{productId} or /event/intern/last/consumption/favorites (favorites returns an array with interesting products like Beer, Cola, Rum, etc)

It's not possible to show the current consumption. If a guest likes to know the consumption of the current event he has to come back next time and have look at the numbers of the last event.