aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/UserLibraryController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-07-07 09:10:51 -0600
committercrobibero <cody@robibe.ro>2020-07-07 09:10:51 -0600
commit5d34b07d1ff7239c7961381fc71559d377e7a96b (patch)
tree405408d5cd266b25fc3182951592ce912b0286fd /Jellyfin.Api/Controllers/UserLibraryController.cs
parent2eef7d49131d717a0752cf3dcab1922637e2ef98 (diff)
Make query parameters nullable or set default value
Diffstat (limited to 'Jellyfin.Api/Controllers/UserLibraryController.cs')
-rw-r--r--Jellyfin.Api/Controllers/UserLibraryController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/UserLibraryController.cs b/Jellyfin.Api/Controllers/UserLibraryController.cs
index ca804ebc9..cedda3b9d 100644
--- a/Jellyfin.Api/Controllers/UserLibraryController.cs
+++ b/Jellyfin.Api/Controllers/UserLibraryController.cs
@@ -180,7 +180,7 @@ namespace Jellyfin.Api.Controllers
/// <returns>An <see cref="OkResult"/> containing the <see cref="UserItemDataDto"/>.</returns>
[HttpPost("/Users/{userId}/Items/{itemId}/Rating")]
[ProducesResponseType(StatusCodes.Status200OK)]
- public ActionResult<UserItemDataDto> UpdateUserItemRating([FromRoute] Guid userId, [FromRoute] Guid itemId, [FromQuery] bool likes)
+ public ActionResult<UserItemDataDto> UpdateUserItemRating([FromRoute] Guid userId, [FromRoute] Guid itemId, [FromQuery] bool? likes)
{
return UpdateUserItemRatingInternal(userId, itemId, likes);
}
@@ -264,7 +264,7 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<IEnumerable<BaseItemDto>> GetLatestMedia(
[FromRoute] Guid userId,
- [FromQuery] Guid parentId,
+ [FromQuery] Guid? parentId,
[FromQuery] string? fields,
[FromQuery] string? includeItemTypes,
[FromQuery] bool? isPlayed,
@@ -297,7 +297,7 @@ namespace Jellyfin.Api.Controllers
IncludeItemTypes = RequestHelpers.Split(includeItemTypes, ',', true),
IsPlayed = isPlayed,
Limit = limit,
- ParentId = parentId,
+ ParentId = parentId ?? Guid.Empty,
UserId = userId,
}, dtoOptions);