Skip to content

Commit

Permalink
filters user who dont have emails
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Jul 17, 2023
1 parent 1fcf791 commit dd834cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ Emailer.marketing.synchronize = async (req, res) => {
winston.info('[plugins/emailer-sendgrid] Synchronizing...');
try {
await batch.processSortedSet('users:joindate', async (uids) => {
const data = await user.getUsersFields(uids, ['username', 'email', 'fullname']);

let data = await user.getUsersFields(uids, ['username', 'email', 'fullname']);
data = data.filter(u => u && u.email);
await Client.request({
method: 'PUT',
url: `/v3/marketing/contacts`,
Expand Down

0 comments on commit dd834cb

Please sign in to comment.