mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Merge pull request #11028 from nielsvanvelzen/api-userid-optional2
Make userId optional in GetProgramsDto
This commit is contained in:
commit
f5c55c832f
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user