Make query parameters nullable or set default value

This commit is contained in:
crobibero
2020-07-07 09:10:51 -06:00
parent 2eef7d4913
commit 5d34b07d1f
31 changed files with 442 additions and 408 deletions

View File

@@ -56,8 +56,8 @@ namespace Jellyfin.Api.Controllers
/// </summary>
/// <param name="userId">User id.</param>
/// <param name="includeExternalContent">Whether or not to include external views such as channels or live tv.</param>
/// <param name="includeHidden">Whether or not to include hidden content.</param>
/// <param name="presetViews">Preset views.</param>
/// <param name="includeHidden">Whether or not to include hidden content.</param>
/// <response code="200">User views returned.</response>
/// <returns>An <see cref="OkResult"/> containing the user views.</returns>
[HttpGet("/Users/{userId}/Views")]
@@ -65,8 +65,8 @@ namespace Jellyfin.Api.Controllers
public ActionResult<QueryResult<BaseItemDto>> GetUserViews(
[FromRoute] Guid userId,
[FromQuery] bool? includeExternalContent,
[FromQuery] bool includeHidden,
[FromQuery] string? presetViews)
[FromQuery] string? presetViews,
[FromQuery] bool includeHidden = false)
{
var query = new UserViewQuery
{