diff --git a/config/lib/data-log.js b/config/lib/data-log.js index 514a68b0..0cf375e8 100644 --- a/config/lib/data-log.js +++ b/config/lib/data-log.js @@ -93,7 +93,7 @@ module.exports.announceLog = function (user, torrent, data) { //remove user-days-log old data UserDaysLog.remove({ - month: {$lt: mom.subtract(12, 'months')} + month: {$lt: mom.subtract(12, 'months').get('month') + 1} }, function (err) { if (err) { logger.error(err); @@ -178,7 +178,7 @@ module.exports.scoreLog = function (user, score) { //remove user-days-log old data UserDaysLog.remove({ - month: {$lt: mom.subtract(12, 'months')} + month: {$lt: mom.subtract(12, 'months').get('month') + 1} }, function (err) { if (err) { logger.error(err);