mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -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)]
|
[Authorize(Policy = Policies.LiveTvAccess)]
|
||||||
public async Task<ActionResult<QueryResult<BaseItemDto>>> GetPrograms([FromBody] GetProgramsDto body)
|
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)
|
var query = new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ public class GetProgramsDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets optional. Filter by user id.
|
/// Gets or sets optional. Filter by user id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid UserId { get; set; }
|
public Guid? UserId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the minimum premiere start date.
|
/// Gets or sets the minimum premiere start date.
|
||||||
|
Loading…
Reference in New Issue
Block a user