mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix server list loading
This commit is contained in:
parent
9856441503
commit
e6cbda2c89
@ -1,5 +1,8 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 3.0.1.0 - 9/19/2022
|
||||
* Official release of the 3.0 codebase
|
||||
|
||||
#### Version - 3.0.0.7 - 9/12/2022
|
||||
* Fix Dragons' Dogma MO2 archive names
|
||||
* Add Modlist Report for CLI
|
||||
|
@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Security.Claims;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using FluentFTP.Helpers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@ -76,12 +77,23 @@ public class AuthorControls : ControllerBase
|
||||
var repos = await LoadRepositories();
|
||||
|
||||
return await repos.PMapAll(async url =>
|
||||
(await _client.GetFromJsonAsync<ModlistMetadata[]>(_limiter, new HttpRequestMessage(HttpMethod.Get, url.Value),
|
||||
_dtos.Options))!.Select(meta =>
|
||||
{
|
||||
try
|
||||
{
|
||||
meta.RepositoryName = url.Key;
|
||||
return meta;
|
||||
}))
|
||||
return (await _client.GetFromJsonAsync<ModlistMetadata[]>(_limiter,
|
||||
new HttpRequestMessage(HttpMethod.Get, url.Value),
|
||||
_dtos.Options))!.Select(meta =>
|
||||
{
|
||||
meta.RepositoryName = url.Key;
|
||||
return meta;
|
||||
});
|
||||
}
|
||||
catch (JsonException ex)
|
||||
{
|
||||
_logger.LogError(ex, "While loading repository {Name} from {Url}", url.Key, url.Value);
|
||||
return Enumerable.Empty<ModlistMetadata>();
|
||||
}
|
||||
})
|
||||
.SelectMany(x => x)
|
||||
.ToArray();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user