Merge pull request #1503 from cvium/webapi_v2

Move StartupWizard to ASP.NET Web Api
This commit is contained in:
Vasily 2019-11-27 11:50:06 +03:00 committed by GitHub
commit 5263aaa026
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 819 additions and 232 deletions

View file

@ -4,7 +4,6 @@ using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
@ -67,7 +66,7 @@ namespace Emby.Server.Implementations.Session
{
if (queryString == null)
{
throw new ArgumentNullException(nameof(queryString));
return null;
}
var token = queryString["api_key"];
@ -75,6 +74,7 @@ namespace Emby.Server.Implementations.Session
{
return null;
}
var deviceId = queryString["deviceId"];
return _sessionManager.GetSessionByAuthenticationToken(token, deviceId, remoteEndpoint);
}