fix: allow metadata in update organization request (#700)

This commit is contained in:
Bereket Engida
2024-11-29 20:23:39 +03:00
committed by GitHub
parent 74eb485597
commit fa2e4b498f
2 changed files with 9 additions and 1 deletions

View File

@@ -237,7 +237,10 @@ export const getOrgAdapter = (
value: organizationId,
},
],
update: data,
update: {
...data,
metadata: data.metadata ? JSON.stringify(data.metadata) : undefined,
},
});
return organization;
},

View File

@@ -140,6 +140,11 @@ export const updateOrganization = createAuthEndpoint(
description: "The logo of the organization",
})
.optional(),
metadata: z
.record(z.string(), z.any(), {
description: "The metadata of the organization",
})
.optional(),
})
.partial(),
organizationId: z.string().optional(),