(Fix) Announce Controller

This commit is contained in:
HDVinnie
2018-08-08 12:31:07 -04:00
parent 8d23212182
commit 2d907a3a94
+2 -2
View File
@@ -404,8 +404,8 @@ class AnnounceController extends Controller
}
}
$torrent->seeders = $torrent->peers->where('left', '=', '0')->count();
$torrent->leechers = $torrent->peers->where('left', '>', '0')->count();
$torrent->seeders = Peer::where('torrent_id', '=', $torrent->id)->where('left', '=', '0')->count();
$torrent->leechers = Peer::where('torrent_id', '=', $torrent->id)->where('left', '>', '0')->count();
$torrent->save();
$res = [];