From 8b9baa0079a98d60f4a19583658c27c5fd603b23 Mon Sep 17 00:00:00 2001 From: michellelin1 Date: Tue, 21 May 2024 22:10:30 -0700 Subject: [PATCH] changed AISSBackend to NPOBackend --- src/components/EmailTemplates/EmailSending.jsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/EmailTemplates/EmailSending.jsx b/src/components/EmailTemplates/EmailSending.jsx index 42014b8..63c25a3 100644 --- a/src/components/EmailTemplates/EmailSending.jsx +++ b/src/components/EmailTemplates/EmailSending.jsx @@ -1,16 +1,11 @@ -import axios from 'axios'; import { renderEmail } from 'react-html-email'; - -const AISSBackend = axios.create({ - baseURL: import.meta.env.VITE_BACKEND_HOST, - withCredentials: true, -}); +import { NPOBackend } from '../../utils/auth_utils'; const sendEmail = async (subject, newEmail, emailtemplate) => { try { //send Debbie email when user registers const debbieMail = import.meta.env.VITE_EMAIL_USERNAME; - const response = await AISSBackend.post('/nodemailer/send', { + const response = await NPOBackend.post('/nodemailer/send', { email: debbieMail, messageHtml: renderEmail(emailtemplate({ newEmail })), subject,