chore: avoid returning unnecessary info

This commit is contained in:
Catalin Pit
2024-01-25 17:33:35 +02:00
parent 311c8da8fc
commit e2fa01509d

View File

@ -37,5 +37,12 @@ export const sendConfirmationToken = async ({ email }: { email: string }) => {
throw new Error(`Failed to create the verification token`);
}
return sendConfirmationEmail({ userId: user.id });
// TODO: Revisit tomorrow
try {
await sendConfirmationEmail({ userId: user.id });
return { success: true };
} catch (err) {
throw new Error(`Failed to send the confirmation email`);
}
};