this time actually fixed pl-api

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-10-09 13:24:11 +02:00
parent 8f17bb8783
commit 299fd52dc1
4 changed files with 7 additions and 8 deletions

View File

@ -85,7 +85,6 @@ const baseAccountSchema = z.object({
group: z.boolean().catch(false),
discoverable: z.boolean().catch(false),
noindex: z.boolean().nullable().catch(null),
moved: z.null().catch(null),
suspended: z.boolean().optional().catch(undefined),
limited: z.boolean().optional().catch(undefined),
created_at: z.string().datetime().catch(new Date().toUTCString()),
@ -138,7 +137,7 @@ type WithMoved = {
moved: Account | null;
};
type Account = z.infer<typeof baseAccountSchema> & WithMoved;
type Account = z.infer<typeof accountWithMovedAccountSchema> & WithMoved;
const accountSchema: z.ZodType<Account> = untypedAccountSchema as any;

View File

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "0.0.40",
"version": "0.0.41",
"type": "module",
"homepage": "https://github.com/mkljczk/pl-fe/tree/fork/packages/pl-api",
"repository": {