k4cg / matomat-service

Matomat as a Service (MaaS)
MIT License
5 stars 2 forks source link

UserStats is only giving back the consumtion stats for 1 drink #18

Closed noqqe closed 5 years ago

noqqe commented 5 years ago

Hi,

When i call users_user_id_stats_get(1) as user admin (userId 1) it shows:

[{'id': 1, 'name': 'Club Mate', 'cost': 100, 'consumed': 39}]

Which actually is the amount of mate this account consumed. Its just not telling me the amount of any other Item this account consumed. Item Ids 2-4 were also consumed multiple times bot not being responded by the userStats object.

winterMate commented 5 years ago

Bug fixed with PR#19 To fix the bug in existing databases apply the mig-bug-18.sql db migration script. E.g. sqlite3 matomat.db < mig-bug-18.sql