Return NotFound when itemId isn't found

This commit is contained in:
Bond_009
2023-02-04 17:56:12 +01:00
parent 6bf34f8e22
commit 52230d1c30
25 changed files with 370 additions and 30 deletions

View File

@@ -1211,7 +1211,7 @@ public class LiveTvController : BaseJellyfinApiController
private async Task AssertUserCanManageLiveTv()
{
var user = _userManager.GetUserById(User.GetUserId());
var user = _userManager.GetUserById(User.GetUserId()) ?? throw new ResourceNotFoundException();
var session = await _sessionManager.LogSessionActivity(
User.GetClient(),
User.GetVersion(),