call changeEmail before the callback in setDefaultEmailAddress

This commit is contained in:
Henry Oswald 2018-08-31 11:49:45 +01:00
parent bab334aa44
commit 245ad2a2a8

View file

@ -112,8 +112,8 @@ module.exports = UserUpdater =
else if res.n == 0 # TODO: Check n or nMatched?
return callback(new Error('Default email does not belong to user'))
else
callback()
NewsletterManager.changeEmail oldEmail, email, ->
callback()