summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-19 00:01:37 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-19 00:01:37 +0900
commitf5937d02566b3d34662318878a258b2d85db25d3 (patch)
tree512ece85b1832d867643685d6465f6c1942def06 /src
parentUpdate post-detail.tag (diff)
downloadsharkey-f5937d02566b3d34662318878a258b2d85db25d3.tar.gz
sharkey-f5937d02566b3d34662318878a258b2d85db25d3.tar.bz2
sharkey-f5937d02566b3d34662318878a258b2d85db25d3.zip
[API] Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/api/endpoints/posts/polls/vote.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/endpoints/posts/polls/vote.ts b/src/api/endpoints/posts/polls/vote.ts
index e345497905..6e71d1816f 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');