api torrent list compatible with special section use normal section searchBox

This commit is contained in:
xiaomlove
2025-05-28 15:13:44 +07:00
parent b63e601f25
commit e5947a8586
+1 -1
View File
@@ -72,7 +72,7 @@ class TorrentRepository extends BaseRepository
if (empty($searchBox)) { if (empty($searchBox)) {
throw new NexusException(nexus_trans("upload.invalid_section")); throw new NexusException(nexus_trans("upload.invalid_section"));
} }
if ($searchBox->isSectionSpecial() && !Permission::canViewSpecialSection()) { if (!$searchBox->isSectionBrowse() && $searchBox->isSectionSpecial() && !Permission::canViewSpecialSection()) {
throw new InsufficientPermissionException(); throw new InsufficientPermissionException();
} }
$categoryIdList = $searchBox->categories()->pluck('id')->toArray(); $categoryIdList = $searchBox->categories()->pluck('id')->toArray();