mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
[API] Fix bug
This commit is contained in:
parent
0c0f43c55b
commit
97c9935c68
@ -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 New Issue
Block a user