mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 04:12:06 +10:00
fix: validate Resend API key before creating mail transport (#2672)
This commit is contained in:
@@ -64,9 +64,13 @@ const getTransport = (): Transporter => {
|
||||
}
|
||||
|
||||
if (transport === 'resend') {
|
||||
if (!env('NEXT_PRIVATE_RESEND_API_KEY')) {
|
||||
throw new Error('Resend transport requires NEXT_PRIVATE_RESEND_API_KEY');
|
||||
}
|
||||
|
||||
return createTransport(
|
||||
ResendTransport.makeTransport({
|
||||
apiKey: env('NEXT_PRIVATE_RESEND_API_KEY') || '',
|
||||
apiKey: env('NEXT_PRIVATE_RESEND_API_KEY'),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user