Skip to content

Commit

Permalink
Added comment to addEmail method
Browse files Browse the repository at this point in the history
  • Loading branch information
naz committed Nov 7, 2019
1 parent eca129c commit f34f4a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/server/services/mega/mega.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f34f4a7

Please sign in to comment.