fix(announce): fixed data log issue

This commit is contained in:
OldHawk
2018-05-04 18:22:31 +08:00
parent db889480c6
commit 87ee4015d5

View File

@@ -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);