mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 16:24:14 +01:00
fix some stuff
This commit is contained in:
parent
dc33858626
commit
e496e7161c
3 changed files with 4 additions and 4 deletions
|
|
@ -71,7 +71,7 @@ public class Startup
|
||||||
a.FeatureProviders.Remove(a.FeatureProviders.OfType<ControllerFeatureProvider>().First());
|
a.FeatureProviders.Remove(a.FeatureProviders.OfType<ControllerFeatureProvider>().First());
|
||||||
if (mareConfig.GetValue<Uri>(nameof(ServerConfiguration.MainServerAddress), defaultValue: null) == null)
|
if (mareConfig.GetValue<Uri>(nameof(ServerConfiguration.MainServerAddress), defaultValue: null) == null)
|
||||||
{
|
{
|
||||||
a.FeatureProviders.Add(new AllowedControllersFeatureProvider(typeof(MareServerConfigurationController), typeof(MareAuthBaseConfigurationController), typeof(ClientMessageController)));
|
a.FeatureProviders.Add(new AllowedControllersFeatureProvider(typeof(MareServerConfigurationController), typeof(MareBaseConfigurationController), typeof(ClientMessageController)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@ public class MareStaticFilesServerConfigurationController : MareConfigurationCon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MareAuthBaseConfigurationController : MareConfigurationController<MareConfigurationAuthBase>
|
public class MareBaseConfigurationController : MareConfigurationController<MareConfigurationBase>
|
||||||
{
|
{
|
||||||
public MareAuthBaseConfigurationController(IOptionsMonitor<MareConfigurationAuthBase> config, ILogger<MareAuthBaseConfigurationController> logger) : base(config, logger)
|
public MareBaseConfigurationController(IOptionsMonitor<MareConfigurationBase> config, ILogger<MareBaseConfigurationController> logger) : base(config, logger)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public class MareConfigurationServiceClient<T> : IHostedService, IConfigurationS
|
||||||
if (_config.CurrentValue.GetType() == typeof(ServerConfiguration))
|
if (_config.CurrentValue.GetType() == typeof(ServerConfiguration))
|
||||||
return new Uri((_config.CurrentValue as ServerConfiguration).MainServerAddress, $"configuration/MareServerConfiguration/{nameof(MareServerConfigurationController.GetConfigurationEntry)}?key={key}&defaultValue={value}");
|
return new Uri((_config.CurrentValue as ServerConfiguration).MainServerAddress, $"configuration/MareServerConfiguration/{nameof(MareServerConfigurationController.GetConfigurationEntry)}?key={key}&defaultValue={value}");
|
||||||
if (_config.CurrentValue.GetType() == typeof(MareConfigurationBase))
|
if (_config.CurrentValue.GetType() == typeof(MareConfigurationBase))
|
||||||
return new Uri((_config.CurrentValue as MareConfigurationBase).MainServerAddress, $"configuration/MareAuthBaseConfiguration/{nameof(MareAuthBaseConfigurationController.GetConfigurationEntry)}?key={key}&defaultValue={value}");
|
return new Uri((_config.CurrentValue as MareConfigurationBase).MainServerAddress, $"configuration/MareBaseConfiguration/{nameof(MareBaseConfigurationController.GetConfigurationEntry)}?key={key}&defaultValue={value}");
|
||||||
if (_config.CurrentValue.GetType() == typeof(ServicesConfiguration))
|
if (_config.CurrentValue.GetType() == typeof(ServicesConfiguration))
|
||||||
return new Uri((_config.CurrentValue as ServicesConfiguration).MainServerAddress, $"configuration/MareServicesConfiguration/{nameof(MareServicesConfigurationController.GetConfigurationEntry)}?key={key}&defaultValue={value}");
|
return new Uri((_config.CurrentValue as ServicesConfiguration).MainServerAddress, $"configuration/MareServicesConfiguration/{nameof(MareServicesConfigurationController.GetConfigurationEntry)}?key={key}&defaultValue={value}");
|
||||||
if (_config.CurrentValue.GetType() == typeof(StaticFilesServerConfiguration))
|
if (_config.CurrentValue.GetType() == typeof(StaticFilesServerConfiguration))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue