From ffa83eca032ac95af6a4e63381c3108de440188d Mon Sep 17 00:00:00 2001 From: gyumi Date: Tue, 19 Nov 2024 01:54:48 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BE=20updated=20github=20actions=20to?= =?UTF-8?q?=20run=20tests=20on=20push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 + backend/src/routes/OTP/sendEmail.ts | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 404bd10..69810e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: branches: - main - feature/login + - feature/forgot-password pull_request: branches: - main diff --git a/backend/src/routes/OTP/sendEmail.ts b/backend/src/routes/OTP/sendEmail.ts index bb4884c..bfb51a3 100644 --- a/backend/src/routes/OTP/sendEmail.ts +++ b/backend/src/routes/OTP/sendEmail.ts @@ -1,13 +1,13 @@ import Mailgun from "mailgun.js"; import FormData from 'form-data'; -const mailgun = new Mailgun(FormData); -const mg = mailgun.client({username: 'api', key: process.env["EMAIL_KEY"] || ""}); +//const mailgun = new Mailgun(FormData); +//const mg = mailgun.client({username: 'api', key: process.env["EMAIL_KEY"] || ""}); export const sendEmail = async (emailAddress: string, userName: string, code: string) => { - if(!mg){ - throw new Error("invalid email key"); - } + // if(!mg){ + // throw new Error("invalid email key"); + // } console.log(`emailing ${userName} at ${emailAddress} with otp ${code}.`); // const senderDomain = "";