- cache returns -1 as a string
This commit is contained in:
HDVinnie
2023-10-10 17:39:11 -04:00
parent ac226e1906
commit 86d5dbb2fd

View File

@@ -384,11 +384,11 @@ class AnnounceController extends Controller
fn () => Torrent::withoutGlobalScope(ApprovedScope::class)
->select(['id', 'free', 'doubleup', 'seeders', 'leechers', 'times_completed', 'status'])
->where('info_hash', '=', $infoHash)
->first()
->firstOr(fn () => -1)
);
// If Torrent Doesn't Exsist Return Error to Client
if ($torrent === null) {
if ($torrent === '-1') {
throw new TrackerException(150);
}