trying to enforce default value

This commit is contained in:
2023-03-22 17:55:52 +01:00
parent de59fe828e
commit 8b870a4b8a
+6 -1
View File
@@ -71,7 +71,12 @@ router.post(
'victim_weapon_3_mods',
'victim_offhand_weapon_1',
'victim_offhand_weapon_2'
]).default(0),
]).customSanitizer((value) => {
if (isNaN(value) || !value) {
value = 0
}
return value
}),
body([
'attacker_current_weapon_mods',
'attacker_weapon_1_mods',