pl-api: allow polls with one option
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -20,7 +20,7 @@ const pollSchema = v.object({
|
|||||||
expires_at: v.fallback(v.nullable(datetimeSchema), null),
|
expires_at: v.fallback(v.nullable(datetimeSchema), null),
|
||||||
id: v.string(),
|
id: v.string(),
|
||||||
multiple: v.fallback(v.boolean(), false),
|
multiple: v.fallback(v.boolean(), false),
|
||||||
options: v.pipe(v.array(pollOptionSchema), v.minLength(2)),
|
options: v.pipe(v.array(pollOptionSchema), v.minLength(1)),
|
||||||
voters_count: v.fallback(v.number(), 0),
|
voters_count: v.fallback(v.number(), 0),
|
||||||
votes_count: v.fallback(v.number(), 0),
|
votes_count: v.fallback(v.number(), 0),
|
||||||
own_votes: v.fallback(v.nullable(v.pipe(v.array(v.number()), v.minLength(1))), null),
|
own_votes: v.fallback(v.nullable(v.pipe(v.array(v.number()), v.minLength(1))), null),
|
||||||
|
|||||||
Reference in New Issue
Block a user