From 3997cabff7de7aa3f10dc5a5a70efc0eaedfa229 Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Wed, 5 May 2021 22:29:13 +0900 Subject: [PATCH] fix: missing querystring label --- pages/api/v2/bots/[id]/vote.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/v2/bots/[id]/vote.ts b/pages/api/v2/bots/[id]/vote.ts index e7c5a9a..f10754f 100644 --- a/pages/api/v2/bots/[id]/vote.ts +++ b/pages/api/v2/bots/[id]/vote.ts @@ -12,7 +12,7 @@ const BotVote = RequestHandler() const bot = await get.BotAuthorization(req.headers.authorization) if(!bot) return ResponseWrapper(res, { code: 401 }) 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 }) return null })