Merge pull request #11028 from nielsvanvelzen/api-userid-optional2

Make userId optional in GetProgramsDto
This commit is contained in:
Bond-009 2024-02-22 14:10:34 +01:00 committed by GitHub
commit f5c55c832f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -636,7 +636,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.