set weapons mods to be optional

This commit is contained in:
2023-03-12 12:17:12 +01:00
parent 131d1d9ae8
commit d98d56e218
+5 -2
View File
@@ -69,8 +69,6 @@ router.post(
'attacker_weapon_3_mods',
'attacker_offhand_weapon_1',
'attacker_offhand_weapon_2',
'distance',
'player_count',
'victim_current_weapon_mods',
'victim_weapon_1_mods',
'victim_weapon_2_mods',
@@ -81,6 +79,11 @@ router.post(
.toInt()
.isInt()
.withMessage('must be a valid int'),
body(['distance', 'player_count'])
.optional()
.toInt()
.isInt()
.withMessage('must be a valid int'),
body(['distance', 'game_time'])
.toFloat()
.isFloat()