Skip to content
Snippets Groups Projects
Commit f5937d02 authored by syuilo's avatar syuilo
Browse files

[API] Fix bug

parent c79d490e
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment