diff --git a/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js b/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js index 677ff32347..01d1bed090 100644 --- a/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js +++ b/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js @@ -33,8 +33,8 @@ module.exports = _.template(`\ <% } %>
- If the button above does not appear, please open the link in your browser here:
- <%= ctaURL %>
+ If the button above does not appear, please copy and paste this link into your browser's address bar:
+
<%= ctaURL %>
diff --git a/services/web/app/src/Features/User/UserEmailsController.js b/services/web/app/src/Features/User/UserEmailsController.js index 3529b79ec4..0b619299a3 100644 --- a/services/web/app/src/Features/User/UserEmailsController.js +++ b/services/web/app/src/Features/User/UserEmailsController.js @@ -137,14 +137,15 @@ module.exports = UserEmailsController = { confirm(req, res, next) { const { token } = req.body if (!token) { - return res.sendStatus(422) + return res.status(422).json({ + message: req.i18n.translate('confirmation_link_broken') + }) } UserEmailsConfirmationHandler.confirmEmailFromToken(token, function(error) { if (error) { if (error instanceof Errors.NotFoundError) { res.status(404).json({ - message: - 'Sorry, your confirmation token is invalid or has expired. Please request a new email confirmation link.' + message: req.i18n.translate('confirmation_token_invalid') }) } else { next(error) diff --git a/services/web/test/unit/src/User/UserEmailsControllerTests.js b/services/web/test/unit/src/User/UserEmailsControllerTests.js index 4c205ae5f7..8ca0e60d79 100644 --- a/services/web/test/unit/src/User/UserEmailsControllerTests.js +++ b/services/web/test/unit/src/User/UserEmailsControllerTests.js @@ -303,7 +303,7 @@ describe('UserEmailsController', function() { }) it('should return a 422 status', function() { - return this.res.sendStatus.calledWith(422).should.equal(true) + return this.res.status.calledWith(422).should.equal(true) }) }) @@ -319,8 +319,7 @@ describe('UserEmailsController', function() { this.res.status.calledWith(404).should.equal(true) return this.res.json .calledWith({ - message: - 'Sorry, your confirmation token is invalid or has expired. Please request a new email confirmation link.' + message: this.req.i18n.translate('confirmation_token_invalid') }) .should.equal(true) })