Skip to content

The Open Source DocuSign Alternative.

chore: avoid returning unnecessary info

Catalin Pite2fa01509dc6
diff --git a/packages/lib/server-only/user/send-confirmation-token.ts b/packages/lib/server-only/user/send-confirmation-token.ts
index 5206d202e..6c070125b 100644
--- a/packages/lib/server-only/user/send-confirmation-token.ts
+++ b/packages/lib/server-only/user/send-confirmation-token.ts
@@ -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`);
+ }
};