forked from Eauldane/SnowcloakClient
replay changes for cleaning up remote configuration and no snap services
This commit is contained in:
@@ -19,7 +19,6 @@ public class HubFactory : MediatorSubscriberBase
|
||||
{
|
||||
private readonly ILoggerProvider _loggingProvider;
|
||||
private readonly ServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly RemoteConfigurationService _remoteConfig;
|
||||
private readonly TokenProvider _tokenProvider;
|
||||
private HubConnection? _instance;
|
||||
private string _cachedConfigFor = string.Empty;
|
||||
@@ -27,11 +26,10 @@ public class HubFactory : MediatorSubscriberBase
|
||||
private bool _isDisposed = false;
|
||||
|
||||
public HubFactory(ILogger<HubFactory> logger, MareMediator mediator,
|
||||
ServerConfigurationManager serverConfigurationManager, RemoteConfigurationService remoteConfig,
|
||||
ServerConfigurationManager serverConfigurationManager,
|
||||
TokenProvider tokenProvider, ILoggerProvider pluginLog) : base(logger, mediator)
|
||||
{
|
||||
_serverConfigurationManager = serverConfigurationManager;
|
||||
_remoteConfig = remoteConfig;
|
||||
_tokenProvider = tokenProvider;
|
||||
_loggingProvider = pluginLog;
|
||||
}
|
||||
@@ -87,16 +85,6 @@ public class HubFactory : MediatorSubscriberBase
|
||||
};
|
||||
}
|
||||
|
||||
if (_serverConfigurationManager.CurrentApiUrl.Equals(ApiController.SnowcloakServiceUri, StringComparison.Ordinal))
|
||||
{
|
||||
var mainServerConfig = await _remoteConfig.GetConfigAsync<HubConnectionConfig>("mainServer").ConfigureAwait(false) ?? new();
|
||||
defaultConfig = mainServerConfig;
|
||||
if (string.IsNullOrEmpty(mainServerConfig.ApiUrl))
|
||||
defaultConfig.ApiUrl = ApiController.SnowcloakServiceApiUri;
|
||||
if (string.IsNullOrEmpty(mainServerConfig.HubUrl))
|
||||
defaultConfig.HubUrl = ApiController.SnowcloakServiceHubUri;
|
||||
}
|
||||
|
||||
string jsonResponse;
|
||||
|
||||
if (stapledWellKnown != null)
|
||||
|
Reference in New Issue
Block a user