mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-14 11:33:49 +00:00
feat(#55): Add error check for Brevo API key
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,9 @@ import {
|
|||||||
|
|
||||||
const apiInstance = new brevo.TransactionalEmailsApi();
|
const apiInstance = new brevo.TransactionalEmailsApi();
|
||||||
const apiKey = apiInstance.authentications['apiKey'];
|
const apiKey = apiInstance.authentications['apiKey'];
|
||||||
|
if (!VITE_BREVO_API_KEY) {
|
||||||
|
throw new Error('Brevo API key is not configured');
|
||||||
|
}
|
||||||
apiKey.apiKey = VITE_BREVO_API_KEY;
|
apiKey.apiKey = VITE_BREVO_API_KEY;
|
||||||
|
|
||||||
const sendEmail = async (subject: string, htmlContentString: string, toAddress: string) => {
|
const sendEmail = async (subject: string, htmlContentString: string, toAddress: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user