Also add the final email to the array of emails on the account

This commit is contained in:
Shane Kilkelly 2018-09-11 10:31:40 +01:00
parent efb6018246
commit 5e17dfd1cb

View file

@ -35,6 +35,11 @@ module.exports = AccountMergeEmailController =
'$set': { '$set': {
'overleaf.id': v1_id, 'overleaf.id': v1_id,
email: final_email email: final_email
},
'$push': {
emails: {
email: final_email, createdAt: new Date()
}
} }
}, (err) -> }, (err) ->
return next(err) if err? return next(err) if err?