mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Wired up the members emails templates
no-issue
This commit is contained in:
parent
f4d202d7c5
commit
257bebbb39
1 changed files with 8 additions and 4 deletions
|
@ -6,6 +6,9 @@ const common = require('../../lib/common');
|
|||
const ghostVersion = require('../../lib/ghost-version');
|
||||
const mail = require('../mail');
|
||||
const models = require('../../models');
|
||||
const signinEmail = require('./emails/signin');
|
||||
const signupEmail = require('./emails/signup');
|
||||
const subscribeEmail = require('./emails/subscribe');
|
||||
|
||||
async function createMember({email, name, note}, options = {}) {
|
||||
const model = await models.Member.add({
|
||||
|
@ -226,15 +229,16 @@ function createApiInstance() {
|
|||
return `Click here to sign in ${url}`;
|
||||
}
|
||||
},
|
||||
getHTML(url, type) {
|
||||
getHTML(url, type, email) {
|
||||
const siteTitle = settingsCache.get('title');
|
||||
switch (type) {
|
||||
case 'subscribe':
|
||||
return `<a href="${url}">Click here to confirm your subscription</a>`;
|
||||
return subscribeEmail({url, email, siteTitle});
|
||||
case 'signup':
|
||||
return `<a href="${url}">Click here to confirm your email address and sign up</a>`;
|
||||
return signupEmail({url, email, siteTitle});
|
||||
case 'signin':
|
||||
default:
|
||||
return `<a href="${url}">Click here to sign in</a>`;
|
||||
return signinEmail({url, email, siteTitle});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue