0
Fork 0
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:
Nazar Gargol 2019-07-30 16:15:53 +02:00
parent 8503bdceb8
commit c7a836b926
3 changed files with 5 additions and 5 deletions

View file

@ -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) {

View file

@ -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);
});
}

View file

@ -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
};