mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Fix unhandled exception
no ref - return result of mail.send
This commit is contained in:
parent
99cc855f55
commit
29ad30bec8
@ -51,7 +51,9 @@ authentication = {
|
||||
resetUrl: resetUrl
|
||||
};
|
||||
|
||||
mail.generateContent({data: emailData, template: 'reset-password'}).then(function (emailContent) {
|
||||
return emailData;
|
||||
}).then(function (emailData) {
|
||||
return mail.generateContent({data: emailData, template: 'reset-password'}).then(function (emailContent) {
|
||||
var payload = {
|
||||
mail: [{
|
||||
message: {
|
||||
@ -65,7 +67,6 @@ authentication = {
|
||||
};
|
||||
return mail.send(payload, {context: {internal: true}});
|
||||
});
|
||||
|
||||
}).then(function () {
|
||||
return when.resolve({passwordreset: [{message: 'Check your email for further instructions.'}]});
|
||||
}).otherwise(function (error) {
|
||||
@ -218,7 +219,7 @@ authentication = {
|
||||
ownerEmail: setupUser.email
|
||||
};
|
||||
|
||||
mail.generateContent({data: data, template: 'welcome'}).then(function (emailContent) {
|
||||
return mail.generateContent({data: data, template: 'welcome'}).then(function (emailContent) {
|
||||
var message = {
|
||||
to: setupUser.email,
|
||||
subject: 'Your New Ghost Blog',
|
||||
@ -231,6 +232,9 @@ authentication = {
|
||||
options: {}
|
||||
}]
|
||||
};
|
||||
|
||||
return payload;
|
||||
}).then(function (payload) {
|
||||
return mail.send(payload, {context: {internal: true}}).otherwise(function (error) {
|
||||
errors.logError(
|
||||
error.message,
|
||||
|
Loading…
Reference in New Issue
Block a user