mirror of
https://github.com/versia-pub/api.git
synced 2026-03-13 04:09:15 +01:00
feat(federation): ♻️ Make all optional fields also nullable
This commit is contained in:
parent
bbcc362bc1
commit
13e7027c37
5 changed files with 52 additions and 44 deletions
|
|
@ -47,7 +47,7 @@ export const PollSchema = ExtensionSchema.extend({
|
|||
extension_type: z.literal("org.lysand:polls/Poll"),
|
||||
options: z.array(ContentFormatSchema),
|
||||
votes: z.array(z.number().int().nonnegative()),
|
||||
multiple_choice: z.boolean().optional(),
|
||||
multiple_choice: z.boolean().optional().nullable(),
|
||||
expires_at: z.string(),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ import { ContentFormatSchema } from "../content_format";
|
|||
* }
|
||||
*/
|
||||
export const VanityExtensionSchema = z.object({
|
||||
avatar_overlay: ContentFormatSchema.optional(),
|
||||
avatar_mask: ContentFormatSchema.optional(),
|
||||
background: ContentFormatSchema.optional(),
|
||||
audio: ContentFormatSchema.optional(),
|
||||
avatar_overlay: ContentFormatSchema.optional().nullable(),
|
||||
avatar_mask: ContentFormatSchema.optional().nullable(),
|
||||
background: ContentFormatSchema.optional().nullable(),
|
||||
audio: ContentFormatSchema.optional().nullable(),
|
||||
pronouns: z.record(
|
||||
z.string(),
|
||||
z.array(
|
||||
|
|
@ -87,7 +87,7 @@ export const VanityExtensionSchema = z.object({
|
|||
]),
|
||||
),
|
||||
),
|
||||
birthday: z.string().optional(),
|
||||
location: z.string().optional(),
|
||||
activitypub: z.string().optional(),
|
||||
birthday: z.string().optional().nullable(),
|
||||
location: z.string().optional().nullable(),
|
||||
activitypub: z.string().optional().nullable(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue