fix optional weapon mods

This commit is contained in:
2023-03-12 14:06:56 +01:00
parent d98d56e218
commit b84e17e7fa
+6 -1
View File
@@ -76,11 +76,11 @@ router.post(
'victim_offhand_weapon_1', 'victim_offhand_weapon_1',
'victim_offhand_weapon_2' 'victim_offhand_weapon_2'
]) ])
.optional()
.toInt() .toInt()
.isInt() .isInt()
.withMessage('must be a valid int'), .withMessage('must be a valid int'),
body(['distance', 'player_count']) body(['distance', 'player_count'])
.optional()
.toInt() .toInt()
.isInt() .isInt()
.withMessage('must be a valid int'), .withMessage('must be a valid int'),
@@ -194,6 +194,11 @@ router.post(
}) })
.then((e) => { .then((e) => {
res.send(201) res.send(201)
console.log(
`[${Date.now().toLocaleString()}] Kill submitted for server ${
req.body.serverId
}, ${attacker_name} killed ${victim_name}`
)
}) })
.catch((e) => { .catch((e) => {
res.send(500) res.send(500)