add console error on sql fail

This commit is contained in:
2023-03-16 09:46:28 +01:00
parent 2904fb2671
commit 3681f2d25d
+2 -1
View File
@@ -11,7 +11,7 @@ router.use('/', register)
//auth middleware //auth middleware
router.post( router.post(
'/:serverId/*', '/:serverId',
header('authorization') header('authorization')
.exists({ checkFalsy: true }) .exists({ checkFalsy: true })
.withMessage('Missing Authorization Header') .withMessage('Missing Authorization Header')
@@ -194,6 +194,7 @@ router.post(
}) })
.catch((e) => { .catch((e) => {
res.sendStatus(500) res.sendStatus(500)
console.error(e)
}) })
} }
) )