mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 18:23:08 +02:00
[API] Fix bug
This commit is contained in:
parent
c79d490ec9
commit
f5937d0256
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
||||||
|
|
Loading…
Reference in a new issue