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:
@ -1,5 +1,8 @@
|
|||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
#### Version - 3.0.1.0 - 9/19/2022
|
||||||
|
* Official release of the 3.0 codebase
|
||||||
|
|
||||||
#### Version - 3.0.0.7 - 9/12/2022
|
#### Version - 3.0.0.7 - 9/12/2022
|
||||||
* Fix Dragons' Dogma MO2 archive names
|
* Fix Dragons' Dogma MO2 archive names
|
||||||
* Add Modlist Report for CLI
|
* Add Modlist Report for CLI
|
||||||
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using FluentFTP.Helpers;
|
using FluentFTP.Helpers;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
@ -76,12 +77,23 @@ public class AuthorControls : ControllerBase
|
|||||||
var repos = await LoadRepositories();
|
var repos = await LoadRepositories();
|
||||||
|
|
||||||
return await repos.PMapAll(async url =>
|
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 (await _client.GetFromJsonAsync<ModlistMetadata[]>(_limiter,
|
||||||
return meta;
|
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)
|
.SelectMany(x => x)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user