mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
Added comment to addEmail method
This commit is contained in:
parent
eca129c18d
commit
f34f4a7b8d
@ -40,6 +40,14 @@ const sendTestEmail = async (post, emails) => {
|
||||
return bulkEmailService.send(emailTmpl, emails);
|
||||
};
|
||||
|
||||
/**
|
||||
* addEmail
|
||||
*
|
||||
* Accepts a post object and creates an email record based on it. Only creates one
|
||||
* record per post
|
||||
*
|
||||
* @param {object} post JSON object
|
||||
*/
|
||||
const addEmail = async (post) => {
|
||||
const {members} = await membersService.api.members.list(Object.assign({filter: 'subscribed:true'}, {limit: 'all'}));
|
||||
const {emailTmpl, emails} = getEmailData(post, members);
|
||||
|
Loading…
Reference in New Issue
Block a user