mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 23:08:12 +09:00
[API] Fix bug
This commit is contained in:
parent
a7e07eb2ec
commit
ee4b83abaa
@ -174,6 +174,11 @@ module.exports = (params, user, app) =>
|
||||
return rej('poll choices must be an array');
|
||||
}
|
||||
|
||||
// 選択肢が空の配列でエラー
|
||||
if (poll.choices.length == 0) {
|
||||
return rej('poll choices is required');
|
||||
}
|
||||
|
||||
// Validate each choices
|
||||
const shouldReject = poll.choices.some(choice => {
|
||||
if (typeof choice !== 'string') return true;
|
||||
|
Loading…
Reference in New Issue
Block a user