Make userId optional in GetProgramsDto

This commit is contained in:
Niels van Velzen 2024-02-18 13:18:16 +01:00
parent 4d93f06732
commit fd957ec7f4
2 changed files with 2 additions and 2 deletions

View File

@ -628,7 +628,7 @@ public class LiveTvController : BaseJellyfinApiController
[Authorize(Policy = Policies.LiveTvAccess)]
public async Task<ActionResult<QueryResult<BaseItemDto>>> GetPrograms([FromBody] GetProgramsDto body)
{
var user = body.UserId.IsEmpty() ? null : _userManager.GetUserById(body.UserId);
var user = body.UserId.IsNullOrEmpty() ? null : _userManager.GetUserById(body.UserId.Value);
var query = new InternalItemsQuery(user)
{

View File

@ -22,7 +22,7 @@ public class GetProgramsDto
/// <summary>
/// Gets or sets optional. Filter by user id.
/// </summary>
public Guid UserId { get; set; }
public Guid? UserId { get; set; }
/// <summary>
/// Gets or sets the minimum premiere start date.