[API] Fix bug

This commit is contained in:
syuilo 2017-03-19 00:01:37 +09:00
parent 0c0f43c55b
commit 97c9935c68

View File

@ -33,7 +33,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'choice' parameter // Get 'choice' parameter
const [choice, choiceError] = const [choice, choiceError] =
$(params.choice).string() $(params.choice).number()
.pipe(c => post.poll.choices.some(x => x.id == c)) .pipe(c => post.poll.choices.some(x => x.id == c))
.$; .$;
if (choiceError) return rej('invalid choice param'); if (choiceError) return rej('invalid choice param');