potential fix for a invalid operation exception on client update

change client library cdn provider as cdnjs seems broken at the moment
This commit is contained in:
RaidMax 2019-12-27 12:10:20 -06:00
parent 042fde971e
commit b251ef00c4
4 changed files with 13 additions and 6 deletions

View File

@ -558,7 +558,12 @@ namespace IW4MAdmin
private async Task OnClientUpdate(EFClient origin) private async Task OnClientUpdate(EFClient origin)
{ {
var client = GetClientsAsList().First(_client => _client.Equals(origin)); var client = GetClientsAsList().FirstOrDefault(_client => _client.Equals(origin));
if (client == null)
{
Logger.WriteWarning($"{origin} expected to exist in client list for update, but they do not");
}
client.Ping = origin.Ping; client.Ping = origin.Ping;
client.Score = origin.Score; client.Score = origin.Score;

View File

@ -236,9 +236,10 @@ namespace IW4MAdmin.Application
private static void ConfigureServices() private static void ConfigureServices()
{ {
//var serviceProvider = new ServiceCollection(); var serviceProvider = new ServiceCollection();
//serviceProvider.AddSingleton<IManager>(ServerManager); serviceProvider.AddSingleton<IManager>(ServerManager);
//serviceProvider.BuildServiceProvider(); var builder = serviceProvider.BuildServiceProvider();
builder.Dispose();
} }
} }
} }

View File

@ -12,6 +12,7 @@ namespace WebfrontCore.Controllers.API
{ {
} }
public IActionResult Index() public IActionResult Index()
{ {
return Ok($"IW4MAdmin API"); return Ok($"IW4MAdmin API");

View File

@ -1,6 +1,6 @@
{ {
"version": "1.0", "version": "1.0",
"defaultProvider": "cdnjs", "defaultProvider": "jsdelivr",
"libraries": [ "libraries": [
{ {
"library": "jquery@3.3.1", "library": "jquery@3.3.1",
@ -24,7 +24,7 @@
"destination": "wwwroot/lib/bootstrap/" "destination": "wwwroot/lib/bootstrap/"
}, },
{ {
"library": "moment.js@2.24.0", "library": "moment@2.24.0",
"destination": "wwwroot/lib/moment.js/" "destination": "wwwroot/lib/moment.js/"
} }
] ]