mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-02 12:52:39 +00:00
improve logging on change email in newsletter
This commit is contained in:
parent
423bc9312d
commit
32749267b8
1 changed files with 1 additions and 1 deletions
|
@ -38,6 +38,7 @@ module.exports =
|
|||
options = buildOptions({email:oldEmail})
|
||||
delete options.body.status
|
||||
options.body.email_address = newEmail
|
||||
logger.log {oldEmail, newEmail, options}, "changing email in newsletter"
|
||||
mailchimp.request options, (err)->
|
||||
if err? and err?.message?.indexOf("merge fields were invalid") != -1
|
||||
logger.log {oldEmail, newEmail}, "unable to change email in newsletter, user has never subscribed"
|
||||
|
@ -75,6 +76,5 @@ buildOptions = (user, is_subscribed)->
|
|||
LNAME: user.last_name
|
||||
MONGO_ID:user._id
|
||||
|
||||
console.log opts
|
||||
return opts
|
||||
|
||||
|
|
Loading…
Reference in a new issue