Skip to content

Commit

Permalink
remove global
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed Mar 18, 2024
1 parent 7981f1e commit d4d41c6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ app.post("/register", async (req, res) => {
await sendConfirmationEmail(
userEmail,
req.headers.host,
token,
transporter,
token
);
res.send(
"Account already exists but is not active. Confirmation email has been resent. Check your inbox and spam folder.",
Expand All @@ -134,8 +133,7 @@ app.post("/register", async (req, res) => {
await sendConfirmationEmail(
userEmail,
req.headers.host,
token,
transporter,
token
);
} catch (err) {
console.error(err);
Expand All @@ -160,7 +158,7 @@ app.post("/register", async (req, res) => {
res.send("Check your email for a confirmation link");
});

function sendConfirmationEmail(userEmail, host, token, transporter) {
function sendConfirmationEmail(userEmail, host, token) {
const mailOptions = {
from: `"${process.env.MAIL_NAME}" <${process.env.MAIL_FROM}>`,
to: userEmail,
Expand Down

0 comments on commit d4d41c6

Please sign in to comment.