Skip to content

Commit

Permalink
for mozilla#251: some review fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Aug 10, 2018
1 parent 2646125 commit ed4674a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/DB.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion email-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ed4674a

Please sign in to comment.