diff options
| author | crobibero <cody@robibe.ro> | 2020-07-07 09:10:51 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-07-07 09:10:51 -0600 |
| commit | 5d34b07d1ff7239c7961381fc71559d377e7a96b (patch) | |
| tree | 405408d5cd266b25fc3182951592ce912b0286fd /Jellyfin.Api/Controllers/SearchController.cs | |
| parent | 2eef7d49131d717a0752cf3dcab1922637e2ef98 (diff) | |
Make query parameters nullable or set default value
Diffstat (limited to 'Jellyfin.Api/Controllers/SearchController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SearchController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/SearchController.cs b/Jellyfin.Api/Controllers/SearchController.cs index 14dc0815c..2cbd32d2f 100644 --- a/Jellyfin.Api/Controllers/SearchController.cs +++ b/Jellyfin.Api/Controllers/SearchController.cs @@ -80,7 +80,7 @@ namespace Jellyfin.Api.Controllers public ActionResult<SearchHintResult> Get( [FromQuery] int? startIndex, [FromQuery] int? limit, - [FromQuery] Guid userId, + [FromQuery] Guid? userId, [FromQuery, Required] string? searchTerm, [FromQuery] string? includeItemTypes, [FromQuery] string? excludeItemTypes, @@ -107,7 +107,7 @@ namespace Jellyfin.Api.Controllers IncludePeople = includePeople, IncludeStudios = includeStudios, StartIndex = startIndex, - UserId = userId, + UserId = userId ?? Guid.Empty, IncludeItemTypes = RequestHelpers.Split(includeItemTypes, ',', true), ExcludeItemTypes = RequestHelpers.Split(excludeItemTypes, ',', true), MediaTypes = RequestHelpers.Split(mediaTypes, ',', true), |
