mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-26 13:09:10 -05:00
update: hide 'flush ghost peers' button when external tracker is enabled
The button doesn't do anything anyways for the external trackers. Users have to just wait it out.
This commit is contained in:
@@ -45,6 +45,10 @@ class FlushController extends Controller
|
||||
*/
|
||||
public function peers(): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
if (config('announce.external_tracker.is_enabled')) {
|
||||
return redirect()->back()->withErrors("The external tracker doesn't support flushing peers.");
|
||||
}
|
||||
|
||||
$carbon = new Carbon();
|
||||
$peers = Peer::select(['torrent_id', 'user_id', 'peer_id', 'updated_at'])->where('updated_at', '<', $carbon->copy()->subHours(2))->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user