mirror of
https://github.com/better-auth/better-auth.git
synced 2026-06-02 12:26:43 -05:00
fix: allow metadata in update organization request (#700)
This commit is contained in:
@@ -237,7 +237,10 @@ export const getOrgAdapter = (
|
||||
value: organizationId,
|
||||
},
|
||||
],
|
||||
update: data,
|
||||
update: {
|
||||
...data,
|
||||
metadata: data.metadata ? JSON.stringify(data.metadata) : undefined,
|
||||
},
|
||||
});
|
||||
return organization;
|
||||
},
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user