groupsSchema: refine --> transform

develop^2
Alex Gleason 2023-03-13 12:05:56 -05:00
rodzic a9b79f72b4
commit 607e6b1808
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ const groupSchema = z.object({
locked: z.boolean().catch(false),
membership_required: z.boolean().catch(false),
members_count: z.number().catch(0),
note: z.string().refine(note => note === '<p></p>' ? '' : note).catch(''),
note: z.string().transform(note => note === '<p></p>' ? '' : note).catch(''),
relationship: groupRelationshipSchema.nullable().catch(null), // Dummy field to be overwritten later
statuses_visibility: z.string().catch('public'),
uri: z.string().catch(''),