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

@@ -815,6 +815,11 @@ public class ItemsController : BaseJellyfinApiController
[FromQuery] bool excludeActiveSessions = false)
{
var user = _userManager.GetUserById(userId);
if (user is null)
{
return NotFound();
}
var parentIdGuid = parentId ?? Guid.Empty;
var dtoOptions = new DtoOptions { Fields = fields }
.AddClientFields(User)