fix(core): fixed subdocument remove issue

This commit is contained in:
OldHawk
2018-05-07 16:45:59 +08:00
parent feee867ee4
commit 1f33ae5289
3 changed files with 3 additions and 3 deletions

View File

@@ -177,7 +177,7 @@ function removeGhostPeers() {
$pull: {_peers: p._id}
}).exec();
p.remove().exec();
p.remove();
});
logger.info(chalk.green('removed ghost peers: ' + count));

View File

@@ -154,7 +154,7 @@ exports.delete = function (req, res) {
//}).exec();
torrent._subtitles.pull(r._id);
r.remove().exec();
r.remove();
res.json(torrent);

View File

@@ -964,7 +964,7 @@ function removeTorrentHnRWarning(tid, removeComplete) {
c.removeHnRWarning(c.user);
}
if (removeComplete) {
c.remove().exec();
c.remove();
}
});
}