kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'view-single-option-polls' into 'main'
allow for viewing single-option polls See merge request soapbox-pub/soapbox!3363merge-requests/3364/head
commit
c568f2dc3c
|
@ -14,7 +14,7 @@ const pollSchema = z.object({
|
|||
expires_at: z.string().datetime().nullable().catch(null),
|
||||
id: z.string(),
|
||||
multiple: z.boolean().catch(false),
|
||||
options: z.array(pollOptionSchema).min(2),
|
||||
options: z.array(pollOptionSchema).min(1),
|
||||
voters_count: z.number().catch(0),
|
||||
votes_count: z.number().catch(0),
|
||||
own_votes: z.array(z.number()).nonempty().nullable().catch(null),
|
||||
|
@ -34,4 +34,4 @@ const pollSchema = z.object({
|
|||
type Poll = z.infer<typeof pollSchema>;
|
||||
type PollOption = Poll['options'][number];
|
||||
|
||||
export { pollSchema, type Poll, type PollOption };
|
||||
export { pollSchema, type Poll, type PollOption };
|
||||
|
|
Ładowanie…
Reference in New Issue