uppsaladatavetare / foobar-api

The backend of the FooBar kiosk and inventory system.
MIT License
12 stars 6 forks source link

Ability to edit wallet corrections #42

Open Thizizmyname opened 7 years ago

Thizizmyname commented 7 years ago

Ability to remove or edit a wallet correction if a mishap has occurred. Perhaps regular users only have ability to change their own wallet log entries, and only given a time-period of 24 hours.

kjagiello commented 7 years ago

I don't think it is a good idea. Let's say that we have three wallet log entries and you need to amend the second most recent, what should happen to the most recent log entry then? It is easier to keep the wallet log entries append-only so we do not need to handle those tough edge cases. So if you want to amend a log entry, you simply create a new one that fixes the mistake of the previous one.