mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-05 18:06:27 +02:00
fix(torrents): fixed the favorites of the torrent cannot be removed after the torrent was removed
This commit is contained in:
@@ -1530,6 +1530,10 @@ exports.delete = function (req, res) {
|
||||
Subtitle.remove({
|
||||
torrent: torrent._id
|
||||
}).exec();
|
||||
//remove all favorites of the torrent
|
||||
Favorite.remove({
|
||||
torrent: torrent._id
|
||||
}).exec();
|
||||
//update maker torrent count
|
||||
if (torrent.maker) {
|
||||
torrent.maker.update({
|
||||
|
||||
Reference in New Issue
Block a user