momentum-mod / website

Momentum Mod's main website.
https://momentum-mod.org
MIT License
55 stars 60 forks source link

Map review validation doesn't error for tiers/ratings with decimal places #970

Open tsa96 opened 1 week ago

tsa96 commented 1 week ago

Backend has an integer check but frontend doesn't. Submitting with a decimal place it will throw a generic 400 and doesn't show the warning well: image

Making the validator check for ints should be pretty easy, angular might have an existing validator, one, if not just use Number.IsInteger.

Going to self-assign this since I'm unhappy with how these toasts are displaying overall and want to mess with doing some custom RxJS operators for alleviating all the catch (err) { this.messageService.add( ... ) } boilerplate we have rn.