Skip to content

Commit

Permalink
Refactor email sending function in emails/index.ts to deal with faili…
Browse files Browse the repository at this point in the history
…ng CI
  • Loading branch information
niyobern committed May 2, 2024
1 parent 25fe3da commit 2d08879
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/emails/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import qs from 'qs'
const apiKey = process.env.MAILGUN_API_KEY || 'your_api_key';
const domain = process.env.MAILGUN_DOMAIN;

type EmailType = "confirm" | "reset";
type EmailType = 'confirm' | 'reset';
type Data = {
name: string;
link: string;
Expand All @@ -27,10 +27,10 @@ async function sendEmail(emailType: EmailType, recipient: string, data: Data) {
const url = `https://api.mailgun.net/v3/${domain}/messages`

const body = {
"from": `Dynamites Account Team <account@${domain}>`,
"to": [recipient],
"subject": "Verification Email",
"html": html,
'from': `Dynamites Account Team <account@${domain}>`,
'to': [recipient],
'subject': 'Verification Email',
'html': html,
}
const formattedBody = qs.stringify(body);

Expand Down

0 comments on commit 2d08879

Please sign in to comment.