From 87ee4015d5b8fbfc47883188d024cecb4df83d34 Mon Sep 17 00:00:00 2001 From: OldHawk Date: Fri, 4 May 2018 18:22:31 +0800 Subject: [PATCH] fix(announce): fixed data log issue --- config/lib/data-log.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);