mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-31 03:16:42 -05:00
fix: add image option to signUpEmail types and schema (#3357)
`signUpEmail` destructures the optional `image` field from the request body and uses it when creating the user, but the field isn’t in the `requestBody` schema or the `$Infer` `body` type
This commit is contained in:
@@ -40,6 +40,7 @@ describe("sign-up with custom fields", async (it) => {
|
||||
email: "email@test.com",
|
||||
password: "password",
|
||||
name: "Test Name",
|
||||
image: "https://picsum.photos/200",
|
||||
},
|
||||
});
|
||||
expect(res.token).toBeDefined();
|
||||
|
||||
@@ -24,6 +24,7 @@ export const signUpEmail = <O extends BetterAuthOptions>() =>
|
||||
name: string;
|
||||
email: string;
|
||||
password: string;
|
||||
image?: string;
|
||||
callbackURL?: string;
|
||||
rememberMe?: boolean;
|
||||
} & AdditionalUserFieldsInput<O>,
|
||||
@@ -48,6 +49,10 @@ export const signUpEmail = <O extends BetterAuthOptions>() =>
|
||||
type: "string",
|
||||
description: "The password of the user",
|
||||
},
|
||||
image: {
|
||||
type: "string",
|
||||
description: "The profile image URL of the user",
|
||||
},
|
||||
callbackURL: {
|
||||
type: "string",
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user