From ed4674acb23547b838ffa236d92eda083d40f3ce Mon Sep 17 00:00:00 2001 From: Luke Crouch Date: Fri, 10 Aug 2018 14:31:06 -0500 Subject: [PATCH] for #251: some review fixups --- db/DB.js | 2 +- email-utils.js | 2 +- routes/user.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/DB.js b/db/DB.js index b8b24aecd25..5066f396fb7 100644 --- a/db/DB.js +++ b/db/DB.js @@ -28,7 +28,7 @@ const DB = { return res[0]; }, - async verifyEmailHash(token, email) { + async verifyEmailHash(token) { const unverifiedSubscriber = await this.getSubscriberByToken(token); const verifiedSubscriber = await this._verifySubscriber(unverifiedSubscriber); return verifiedSubscriber[0]; diff --git a/email-utils.js b/email-utils.js index cf414666b28..232939419b1 100644 --- a/email-utils.js +++ b/email-utils.js @@ -76,7 +76,7 @@ const EmailUtils = { return new Promise((resolve, reject) => { gTransporter.use("compile", hbs(hbsOptions)); - const emailFrom = AppConstants.EMAIL_FROM || `"Firefox Monitor" < ${kSMTPUsername}`; + const emailFrom = AppConstants.EMAIL_FROM || `"Firefox Monitor" <${kSMTPUsername}>`; const mailOptions = { from: emailFrom, to: aRecipient, diff --git a/routes/user.js b/routes/user.js index ffc6473c6a7..6c5be160e17 100644 --- a/routes/user.js +++ b/routes/user.js @@ -49,7 +49,7 @@ router.post("/add", urlEncodedParser, async (req, res) => { }); router.get("/verify", jsonParser, async (req, res) => { - const verifiedEmailHash = await DB.verifyEmailHash(req.query.token, req.query.email); + const verifiedEmailHash = await DB.verifyEmailHash(req.query.token); if (!verifiedEmailHash) { res.status(400).json({ error_code: ResponseCodes.EmailNotFound,