From f5937d02566b3d34662318878a258b2d85db25d3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 Mar 2017 00:01:37 +0900 Subject: [PATCH] [API] Fix bug --- src/api/endpoints/posts/polls/vote.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/endpoints/posts/polls/vote.ts b/src/api/endpoints/posts/polls/vote.ts index e34549790..6e71d1816 100644 --- a/src/api/endpoints/posts/polls/vote.ts +++ b/src/api/endpoints/posts/polls/vote.ts @@ -33,7 +33,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'choice' parameter const [choice, choiceError] = - $(params.choice).string() + $(params.choice).number() .pipe(c => post.poll.choices.some(x => x.id == c)) .$; if (choiceError) return rej('invalid choice param');