From 5e17dfd1cb20c782205c5f29243c8fdf983ed6d6 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Tue, 11 Sep 2018 10:31:40 +0100 Subject: [PATCH] Also add the final email to the array of emails on the account --- .../Features/AccountMerge/AccountMergeEmailController.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee b/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee index d49e409141..f56457e087 100644 --- a/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee +++ b/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee @@ -35,6 +35,11 @@ module.exports = AccountMergeEmailController = '$set': { 'overleaf.id': v1_id, email: final_email + }, + '$push': { + emails: { + email: final_email, createdAt: new Date() + } } }, (err) -> return next(err) if err?