Skip to content

Commit

Permalink
👾 updated github actions to run tests on push
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyoumi committed Nov 18, 2024
1 parent 8ffe1a2 commit ffa83ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- feature/login
- feature/forgot-password
pull_request:
branches:
- main
Expand Down
10 changes: 5 additions & 5 deletions backend/src/routes/OTP/sendEmail.ts
Original file line number Diff line number Diff line change
@@ -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 = "";
Expand Down

0 comments on commit ffa83ec

Please sign in to comment.