diff --git a/app/Http/Controllers/API/TorrentRequestController.php b/app/Http/Controllers/API/TorrentRequestController.php index a392a60cd..5e8b312cd 100644 --- a/app/Http/Controllers/API/TorrentRequestController.php +++ b/app/Http/Controllers/API/TorrentRequestController.php @@ -37,9 +37,9 @@ class RequestController extends Controller return $query->where('name', 'LIKE', '%'.$searchTerm.'%'); }) - ->when($request->filled('categories'), fn ($query) => $query->whereIntegerInRaw('category_id', (array) $request->input('categories'))) - ->when($request->filled('types'), fn ($query) => $query->whereIntegerInRaw('type_id', (array) $request->input('types'))) - ->when($request->filled('resolutions'), fn ($query) => $query->whereIntegerInRaw('resolution_id', (array) $request->input('resolutions'))) + ->when($request->filled('category_id'), fn ($query) => $query->whereIntegerInRaw('category_id', (array) $request->input('category_id'))) + ->when($request->filled('type_id'), fn ($query) => $query->whereIntegerInRaw('type_id', (array) $request->input('type_id'))) + ->when($request->filled('resolution_id'), fn ($query) => $query->whereIntegerInRaw('resolution_id', (array) $request->input('resolution_id'))) ->when($request->filled('tmdb'), function ($query) use ($request) { $tmdb = $request->integer('tmdb'); diff --git a/book/src/torrent_request_api.md b/book/src/torrent_request_api.md index d5fd6dd81..99eb0787b 100644 --- a/book/src/torrent_request_api.md +++ b/book/src/torrent_request_api.md @@ -13,9 +13,9 @@ Filter, sort, and paginate torrent requests. | Parameter | Type | Description | Default | |-----------------|---------|---------------------------------------------------------|-------------| | `name` | string | Search by name | - | -| `categories` | int[] | Filter by category ID(s) | - | -| `types` | int[] | Filter by type ID(s) | - | -| `resolutions` | int[] | Filter by resolution ID(s) | - | +| `category_id` | int[] | Filter by category ID(s) | - | +| `type_id` | int[] | Filter by type ID(s) | - | +| `resolution_id` | int[] | Filter by resolution ID(s) | - | | `tmdb` | integer | Filter by TMDB ID | - | | `imdb` | string | Filter by IMDB ID | - | | `tvdb` | integer | Filter by TVDB ID | - |