improve claim settle

This commit is contained in:
xiaomlove
2022-05-06 15:50:26 +08:00
parent c23cc1b441
commit f64834b594
18 changed files with 124 additions and 69 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ if (!$row) {
// ------------- start claim block ------------------//
$claimTorrentTTL = \App\Models\Claim::getConfigTorrentTTL();
if (\Carbon\Carbon::parse($row['added'])->addDays($claimTorrentTTL)->lte(\Carbon\Carbon::now())) {
if (\App\Models\Claim::getConfigIsEnabled() && \Carbon\Carbon::parse($row['added'])->addDays($claimTorrentTTL)->lte(\Carbon\Carbon::now())) {
$baseClaimQuery = \App\Models\Claim::query()->where('torrent_id', $id);
$claimCounts = (clone $baseClaimQuery)->count();
$isClaimed = (clone $baseClaimQuery)->where('uid', $CURUSER['id'])->exists();