GEWIS / sudosos-backend

SudoSOS is a Node.js-based Bar and POS system made for study association GEWIS.
https://sudosos.gewis.nl
GNU Affero General Public License v3.0
3 stars 3 forks source link

feat: maximum top-up amount check #179

Closed tomudding closed 1 month ago

tomudding commented 2 months ago

Introduces validation for the maximum amount a top-up can have; to verify that the user can only top-up their balance with €150 minus their current balance.

tomudding commented 2 months ago

Based on internal feedback the code has been changed to remove the "fix" that would only allow you to top up with exactly your negative balance. Original code can be found at https://github.com/GEWIS/sudosos-backend/compare/develop...tomudding:sudosos-backend:feature/maximum-topup-check-original.

If the original discussion had been documented/mentioned in GH-135 this could have been prevented. So for future reference, the discussion resulted in determining that the wording is ambiguous, however, the behaviour from SuSOS should be kept and thus the wording in the current version of the TOS* is an actual OR and it does not have an implied currentBalance >= 0 for the second statement.

Current version of the TOS:

exactly their total negative balance (such that their balance becomes 0 euros after the deposit) or at least 10 euros

github-actions[bot] commented 2 weeks ago

:tada: This PR is included in version 0.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: