update: consistent use of meta id parameters

This commit is contained in:
AnabolicsAnonymous
2025-08-30 17:22:41 -05:00
parent ec17bb0989
commit c86f935baa
2 changed files with 6 additions and 6 deletions

View File

@@ -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');

View File

@@ -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 | - |