fix: missing querystring label

This commit is contained in:
wonderlandpark 2021-05-05 22:29:13 +09:00
parent bc35577dc0
commit 3997cabff7
No known key found for this signature in database
GPG Key ID: E3E650B146478C64

View File

@ -12,7 +12,7 @@ const BotVote = RequestHandler()
const bot = await get.BotAuthorization(req.headers.authorization) const bot = await get.BotAuthorization(req.headers.authorization)
if(!bot) return ResponseWrapper(res, { code: 401 }) if(!bot) return ResponseWrapper(res, { code: 401 })
if(req.query.id !== bot) return ResponseWrapper(res, { code: 403 }) if(req.query.id !== bot) return ResponseWrapper(res, { code: 403 })
const userID = await Yup.string().required().validate(req.query.userID).then(el => el).catch(e => { const userID = await Yup.string().required().label('userID').validate(req.query.userID).then(el => el).catch(e => {
ResponseWrapper(res, { code: 400, errors: e.errors }) ResponseWrapper(res, { code: 400, errors: e.errors })
return null return null
}) })