diff --git a/src/user/jobs.js b/src/user/jobs.js index dbc6b1501b..dd6c779fc7 100644 --- a/src/user/jobs.js +++ b/src/user/jobs.js @@ -28,7 +28,7 @@ module.exports = function(User) { return winston.log('[user/jobs] Did not send daily digests because subscription system is disabled.'); } - topics.getLatestTopics(0, 0, 10, 'day', function(err, topics) { + topics.getLatestTopics(0, 0, 10, 'day', function(err, data) { if (err) { return winston.error('[user/jobs] Could not send daily digests: ' + err.message); } @@ -49,7 +49,7 @@ module.exports = function(User) { return next(); } - sendEmails(subscribed, topics, next); + sendEmails(subscribed, data.topics, next); }); }, function(err) { if (err) {