Skip to content

Commit

Permalink
Update template/app/src/auth/userSignupFields.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Šošić <[email protected]>
  • Loading branch information
vincanger and Martinsos authored Jul 16, 2024
1 parent d24825e commit 3da4705
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions template/app/src/auth/userSignupFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,8 @@ export const getDiscordUserFields = defineUserSignupFields({
return discordData.profile.username;
},
isAdmin: (data) => {
const discordData = discordDataSchema.parse(data);
if (discordData.profile.email) {
return adminEmails.includes(discordData.profile.email);
} else {
return false;
}
const email = discordDataSchema.parse(data).email;
return !!email && adminEmails.includes(email);
},
});

Expand Down

0 comments on commit 3da4705

Please sign in to comment.