mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Renamed sendNotification to sendWelcomeMail
- The only thing the method does now is sending welcome mail, so new naming seems natural :)
This commit is contained in:
parent
8503bdceb8
commit
c7a836b926
3 changed files with 5 additions and 5 deletions
|
@ -290,7 +290,8 @@ authentication = {
|
|||
}
|
||||
|
||||
function sendNotification(setupUser) {
|
||||
return auth.setup.sendNotification(setupUser, mailAPI);
|
||||
return auth.setup.sendWelcomeEmail(setupUser.email, mailAPI)
|
||||
.then(() => setupUser);
|
||||
}
|
||||
|
||||
function formatResponse(setupUser) {
|
||||
|
|
|
@ -34,8 +34,7 @@ module.exports = {
|
|||
return auth.setup.doSettings(data, api.settings);
|
||||
})
|
||||
.then((user) => {
|
||||
const notificationUser = user.toJSON({context: {internal: true}});
|
||||
return auth.setup.sendNotification(notificationUser, api.mail)
|
||||
return auth.setup.sendWelcomeEmail(user.get('email'), api.mail)
|
||||
.then(() => user);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ async function doSettings(data, settingsAPI) {
|
|||
return user;
|
||||
}
|
||||
|
||||
function sendNotification(email, mailAPI) {
|
||||
function sendWelcomeEmail(email, mailAPI) {
|
||||
if (config.get('sendWelcomeEmail')) {
|
||||
const data = {
|
||||
ownerEmail: email
|
||||
|
@ -117,5 +117,5 @@ module.exports = {
|
|||
assertSetupCompleted: assertSetupCompleted,
|
||||
setupUser: setupUser,
|
||||
doSettings: doSettings,
|
||||
sendNotification: sendNotification
|
||||
sendWelcomeEmail: sendWelcomeEmail
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue