Update setUsername.ts (#73)

Add email to the user's e-mail field upon registration. Otherwise, Stripe payments won't work, as users signed up with the "email" method won't have anything in their e-mail field.
This commit is contained in:
Adam Łukawski 2024-03-07 10:23:35 +01:00 committed by GitHub
parent aa6b57cafb
commit 731ce7c00c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,7 @@ const adminEmails = process.env.ADMIN_EMAILS?.split(',') || [];
export const getEmailUserFields = defineUserSignupFields({
username: (data: any) => data.email,
isAdmin : (data: any) => adminEmails.includes(data.email),
email: (data: any) => data.email,
});
export const getGitHubUserFields = defineUserSignupFields({