Fix compile errors

This commit is contained in:
Matt Montgomery 2020-08-16 17:45:53 -05:00
parent eaa5711534
commit c49a357f85
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Jellyfin.Api.Constants; using Jellyfin.Api.Constants;
using Jellyfin.Api.Helpers;
using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Net;
@ -148,8 +149,13 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<int> Deauthorize() public ActionResult<int> Deauthorize()
{ {
var userId = ClaimHelpers.GetUserId(request.HttpContext.User); var userId = ClaimHelpers.GetUserId(Request.HttpContext.User);
return _quickConnect.DeleteAllDevices(userId); if (!userId.HasValue)
{
return 0;
}
return _quickConnect.DeleteAllDevices(userId.Value);
} }
} }
} }

View File

@ -1,4 +1,6 @@
namespace Jellyfin.Api.Models.UserDtos using System.ComponentModel.DataAnnotations;
namespace Jellyfin.Api.Models.UserDtos
{ {
/// <summary> /// <summary>
/// The quick connect request body. /// The quick connect request body.