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:
parent
042fde971e
commit
b251ef00c4
@ -558,7 +558,12 @@ namespace IW4MAdmin
|
||||
|
||||
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.Score = origin.Score;
|
||||
|
@ -236,9 +236,10 @@ namespace IW4MAdmin.Application
|
||||
|
||||
private static void ConfigureServices()
|
||||
{
|
||||
//var serviceProvider = new ServiceCollection();
|
||||
//serviceProvider.AddSingleton<IManager>(ServerManager);
|
||||
//serviceProvider.BuildServiceProvider();
|
||||
var serviceProvider = new ServiceCollection();
|
||||
serviceProvider.AddSingleton<IManager>(ServerManager);
|
||||
var builder = serviceProvider.BuildServiceProvider();
|
||||
builder.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ namespace WebfrontCore.Controllers.API
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return Ok($"IW4MAdmin API");
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"defaultProvider": "cdnjs",
|
||||
"defaultProvider": "jsdelivr",
|
||||
"libraries": [
|
||||
{
|
||||
"library": "jquery@3.3.1",
|
||||
@ -24,7 +24,7 @@
|
||||
"destination": "wwwroot/lib/bootstrap/"
|
||||
},
|
||||
{
|
||||
"library": "moment.js@2.24.0",
|
||||
"library": "moment@2.24.0",
|
||||
"destination": "wwwroot/lib/moment.js/"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user