diff --git a/src/ServerManager.WebApplication/Controllers/HealthController.cs b/src/ServerManager.WebApplication/Controllers/HealthController.cs deleted file mode 100644 index 8f677e03..00000000 --- a/src/ServerManager.WebApplication/Controllers/HealthController.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; - -namespace ServerManager.WebApplication.Controllers; - -[Route("api/[controller]")] -[ApiController] -[ApiVersion("1.0")] -[Produces("application/json")] -public class HealthController : ControllerBase -{ - [HttpGet()] - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public IActionResult Get() - { - try - { - return Ok(); - } - catch - { - return StatusCode(StatusCodes.Status500InternalServerError); - } - } -} diff --git a/src/ServerManager.WebApplication/Controllers/ServerController.cs b/src/ServerManager.WebApplication/Controllers/ServerController.cs index 22d64e64..ec9f33f2 100644 --- a/src/ServerManager.WebApplication/Controllers/ServerController.cs +++ b/src/ServerManager.WebApplication/Controllers/ServerController.cs @@ -1,12 +1,10 @@ -using Microsoft.AspNetCore.Http; +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; using ServerManager.WebApplication.Models; using ServerManager.WebApplication.Models.ApiVersion1; using ServerManager.WebApplication.Services; -using System; -using System.Collections.Generic; namespace ServerManager.WebApplication.Controllers; diff --git a/src/ServerManager.WebApplication/Extensions/ServerQueryExtensions.cs b/src/ServerManager.WebApplication/Extensions/ServerQueryExtensions.cs new file mode 100644 index 00000000..d7350088 --- /dev/null +++ b/src/ServerManager.WebApplication/Extensions/ServerQueryExtensions.cs @@ -0,0 +1,18 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using ServerManager.WebApplication.Models.Data; +using ServerManager.WebApplication.Services; + +namespace ServerManager.WebApplication.Extensions; + +public static class ServerQueryExtensions +{ + public static IServiceCollection AddServerQueryServices(this IServiceCollection services, IConfiguration configuration) + { + var settings = configuration.GetSectionAs(); + services.AddSingleton(settings); + + services.AddScoped(); + return services; + } +} diff --git a/src/ServerManager.WebApplication/Extensions/ServiceCollectionExtensions.cs b/src/ServerManager.WebApplication/Extensions/ServiceCollectionExtensions.cs new file mode 100644 index 00000000..192aa414 --- /dev/null +++ b/src/ServerManager.WebApplication/Extensions/ServiceCollectionExtensions.cs @@ -0,0 +1,14 @@ +using Microsoft.Extensions.Configuration; + +namespace ServerManager.WebApplication.Extensions; + +public static class ServiceCollectionExtensions +{ + public static T GetSectionAs(this IConfiguration configuration, string sectionName = null) + { + if (string.IsNullOrWhiteSpace(sectionName)) + sectionName = typeof(T).Name; + + return configuration.GetSection(sectionName).Get(); + } +} diff --git a/src/ServerManager.WebApplication/Extensions/SwaggerDefaultValues.cs b/src/ServerManager.WebApplication/Extensions/SwaggerDefaultValues.cs deleted file mode 100644 index 7a0bbb32..00000000 --- a/src/ServerManager.WebApplication/Extensions/SwaggerDefaultValues.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System.Linq; -using System.Text.Json; - -namespace ServerManager.WebApplication.Extensions -{ - public class SwaggerDefaultValues : IOperationFilter - { - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - var apiDescription = context.ApiDescription; - - operation.Deprecated |= apiDescription.IsDeprecated(); - - foreach (var responseType in context.ApiDescription.SupportedResponseTypes) - { - var responseKey = responseType.IsDefaultResponse ? "default" : responseType.StatusCode.ToString(); - var response = operation.Responses[responseKey]; - - foreach (var contentType in response.Content.Keys) - { - if (!responseType.ApiResponseFormats.Any(x => x.MediaType == contentType)) - { - response.Content.Remove(contentType); - } - } - } - - if (operation.Parameters is null) - { - return; - } - - foreach (var parameter in operation.Parameters) - { - var description = apiDescription.ParameterDescriptions - .First(p => p.Name == parameter.Name); - - if (parameter.Description is null) - { - parameter.Description = description.ModelMetadata?.Description; - } - - if (parameter.Schema.Default is null && description.DefaultValue is not null) - { - var json = JsonSerializer.Serialize(description.DefaultValue, description.ModelMetadata.ModelType); - parameter.Schema.Default = OpenApiAnyFactory.CreateFromJson(json); - } - - parameter.Required |= description.IsRequired; - } - } - } -} diff --git a/src/ServerManager.WebApplication/Middleware/SwaggerDefaultValues.cs b/src/ServerManager.WebApplication/Middleware/SwaggerDefaultValues.cs new file mode 100644 index 00000000..606a9796 --- /dev/null +++ b/src/ServerManager.WebApplication/Middleware/SwaggerDefaultValues.cs @@ -0,0 +1,55 @@ +using System.Linq; +using System.Text.Json; +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace ServerManager.WebApplication.Middleware; + +public class SwaggerDefaultValues : IOperationFilter +{ + public void Apply(OpenApiOperation operation, OperationFilterContext context) + { + var apiDescription = context.ApiDescription; + + operation.Deprecated |= apiDescription.IsDeprecated(); + + foreach (var responseType in context.ApiDescription.SupportedResponseTypes) + { + var responseKey = responseType.IsDefaultResponse ? "default" : responseType.StatusCode.ToString(); + var response = operation.Responses[responseKey]; + + foreach (var contentType in response.Content.Keys) + { + if (!responseType.ApiResponseFormats.Any(x => x.MediaType == contentType)) + { + response.Content.Remove(contentType); + } + } + } + + if (operation.Parameters is null) + { + return; + } + + foreach (var parameter in operation.Parameters) + { + var description = apiDescription.ParameterDescriptions + .First(p => p.Name == parameter.Name); + + if (parameter.Description is null) + { + parameter.Description = description.ModelMetadata?.Description; + } + + if (parameter.Schema.Default is null && description.DefaultValue is not null) + { + var json = JsonSerializer.Serialize(description.DefaultValue, description.ModelMetadata.ModelType); + parameter.Schema.Default = OpenApiAnyFactory.CreateFromJson(json); + } + + parameter.Required |= description.IsRequired; + } + } +} diff --git a/src/ServerManager.WebApplication/Models/ApiVersion1/ErrorResponse.cs b/src/ServerManager.WebApplication/Models/ApiVersion1/ErrorResponse.cs index 35398904..9b3de18c 100644 --- a/src/ServerManager.WebApplication/Models/ApiVersion1/ErrorResponse.cs +++ b/src/ServerManager.WebApplication/Models/ApiVersion1/ErrorResponse.cs @@ -2,15 +2,14 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; -namespace ServerManager.WebApplication.Models.ApiVersion1 +namespace ServerManager.WebApplication.Models.ApiVersion1; + +public class ErrorResponse { - public class ErrorResponse - { - /// - /// List of errors. - /// - [Required] - [Description("List of errors.")] - public ICollection Errors { get; set; } = new List(); - } + /// + /// List of errors. + /// + [Required] + [Description("List of errors.")] + public ICollection Errors { get; set; } = new List(); } diff --git a/src/ServerManager.WebApplication/Models/ApiVersion1/ServerStatusResponse.cs b/src/ServerManager.WebApplication/Models/ApiVersion1/ServerStatusResponse.cs index b466e292..0d69cf76 100644 --- a/src/ServerManager.WebApplication/Models/ApiVersion1/ServerStatusResponse.cs +++ b/src/ServerManager.WebApplication/Models/ApiVersion1/ServerStatusResponse.cs @@ -1,15 +1,14 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; -namespace ServerManager.WebApplication.Models.ApiVersion1 +namespace ServerManager.WebApplication.Models.ApiVersion1; + +public class ServerStatusResponse { - public class ServerStatusResponse - { - /// - /// True if the server is available; otherwise false. - /// - [Required] - [Description("True if the server is available; otherwise false.")] - public string Available { get; set; } = false.ToString(); - } + /// + /// True if the server is available; otherwise false. + /// + [Required] + [Description("True if the server is available; otherwise false.")] + public string Available { get; set; } = false.ToString(); } diff --git a/src/ServerManager.WebApplication/Models/Data/ManagerCode.cs b/src/ServerManager.WebApplication/Models/Data/ManagerCode.cs index c7bb3384..73f1a373 100644 --- a/src/ServerManager.WebApplication/Models/Data/ManagerCode.cs +++ b/src/ServerManager.WebApplication/Models/Data/ManagerCode.cs @@ -1,13 +1,12 @@ using System.Runtime.Serialization; -namespace ServerManager.WebApplication.Models.Data +namespace ServerManager.WebApplication.Models.Data; + +[DataContract] +public class ManagerCode { - [DataContract] - public class ManagerCode - { - [DataMember] - public string Name { get; set; } = string.Empty; - [DataMember] - public string Code { get; set; } = string.Empty; - } + [DataMember] + public string Name { get; set; } = string.Empty; + [DataMember] + public string Code { get; set; } = string.Empty; } diff --git a/src/ServerManager.WebApplication/Models/Data/ServerQuerySettings.cs b/src/ServerManager.WebApplication/Models/Data/ServerQuerySettings.cs new file mode 100644 index 00000000..20993d8f --- /dev/null +++ b/src/ServerManager.WebApplication/Models/Data/ServerQuerySettings.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace ServerManager.WebApplication.Models.Data +{ + public class ServerQuerySettings + { + public List ManagerCodes { get; set; } + } +} diff --git a/src/ServerManager.WebApplication/Models/ServerManagerApiException.cs b/src/ServerManager.WebApplication/Models/ServerManagerApiException.cs index 29892826..be4d76d4 100644 --- a/src/ServerManager.WebApplication/Models/ServerManagerApiException.cs +++ b/src/ServerManager.WebApplication/Models/ServerManagerApiException.cs @@ -2,30 +2,29 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace ServerManager.WebApplication.Models +namespace ServerManager.WebApplication.Models; + +public class ServerManagerApiException : Exception { - public class ServerManagerApiException : Exception + public ServerManagerApiException() : base() + { } + + public ServerManagerApiException(int statusCode, ICollection messages) : base() { - public ServerManagerApiException() : base() - { } - - public ServerManagerApiException(int statusCode, ICollection messages) : base() - { - StatusCode = statusCode; - Messages = messages; - } - - public ServerManagerApiException(int statusCode, ICollection messages, Exception innerException) : base(null, innerException) - { - StatusCode = statusCode; - Messages = messages; - } - - protected ServerManagerApiException(SerializationInfo info, StreamingContext context) : base(info, context) - { } - - public int StatusCode { get; private set; } = 0; - - public ICollection Messages { get; private set; } = new List(); + StatusCode = statusCode; + Messages = messages; } + + public ServerManagerApiException(int statusCode, ICollection messages, Exception innerException) : base(null, innerException) + { + StatusCode = statusCode; + Messages = messages; + } + + protected ServerManagerApiException(SerializationInfo info, StreamingContext context) : base(info, context) + { } + + public int StatusCode { get; private set; } = 0; + + public ICollection Messages { get; private set; } = new List(); } diff --git a/src/ServerManager.WebApplication/Program.cs b/src/ServerManager.WebApplication/Program.cs index 8dbaa0ab..987d9163 100644 --- a/src/ServerManager.WebApplication/Program.cs +++ b/src/ServerManager.WebApplication/Program.cs @@ -1,20 +1,19 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; -namespace ServerManager.WebApplication -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } +namespace ServerManager.WebApplication; - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); +public class Program +{ + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); } diff --git a/src/ServerManager.WebApplication/Services/IServerQueryService.cs b/src/ServerManager.WebApplication/Services/IServerQueryService.cs index bf78545b..bd0e4de3 100644 --- a/src/ServerManager.WebApplication/Services/IServerQueryService.cs +++ b/src/ServerManager.WebApplication/Services/IServerQueryService.cs @@ -1,7 +1,6 @@ -namespace ServerManager.WebApplication.Services +namespace ServerManager.WebApplication.Services; + +public interface IServerQueryService { - public interface IServerQueryService - { - bool CheckServerStatus(string managerCode, string managerVersion, string ipString, int port); - } + bool CheckServerStatus(string managerCode, string managerVersion, string ipString, int port); } diff --git a/src/ServerManager.WebApplication/Services/QueryMasterService.cs b/src/ServerManager.WebApplication/Services/QueryMasterService.cs index ad23114f..741b52ba 100644 --- a/src/ServerManager.WebApplication/Services/QueryMasterService.cs +++ b/src/ServerManager.WebApplication/Services/QueryMasterService.cs @@ -1,78 +1,72 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Configuration; -using QueryMaster; -using ServerManager.WebApplication.Models; -using ServerManager.WebApplication.Models.Data; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net; +using Microsoft.AspNetCore.Http; +using QueryMaster; +using ServerManager.WebApplication.Models; +using ServerManager.WebApplication.Models.Data; -namespace ServerManager.WebApplication.Services +namespace ServerManager.WebApplication.Services; + +public class QueryMasterService : IServerQueryService { - public class QueryMasterService : IServerQueryService + private readonly ServerQuerySettings _settings; + + public QueryMasterService(ServerQuerySettings settings) { - internal const string CONFIG_MANAGERCODES = "ManagerCodes"; + _settings = settings; + } - private readonly IConfiguration _configuration; + public bool CheckServerStatus(string managerCode, string managerVersion, string ipString, int port) + { + ValidateServerStatusRequest(managerCode, ipString, port); - public QueryMasterService(IConfiguration configuration) + try { - _configuration = configuration; + using var server = ServerQuery.GetServerInstance(EngineType.Source, ipString, (ushort)port); + return server.GetInfo() != null; } - - public bool CheckServerStatus(string managerCode, string managerVersion, string ipString, int port) + catch { - ValidateServerStatusRequest(managerCode, ipString, port); + return false; + } + } - try - { - using var server = ServerQuery.GetServerInstance(EngineType.Source, ipString, (ushort)port); + private void ValidateServerStatusRequest(string managerCode, string ipString, int port) + { + var errors = new List(); - var serverInfo = server.GetInfo(); - return serverInfo != null; - } - catch + if (string.IsNullOrWhiteSpace(managerCode)) + { + errors.Add("Manager code is required."); + } + else + { + var managerCodes = _settings.ManagerCodes ?? new List(); + if (!managerCodes.Any(c => c.Code.Equals(managerCode, StringComparison.OrdinalIgnoreCase))) { - return false; + errors.Add("Manager code is invalid."); } } - private void ValidateServerStatusRequest(string managerCode, string ipString, int port) + if (string.IsNullOrWhiteSpace(ipString)) { - var errors = new List(); + errors.Add("IP Address is required."); + } + else if (!IPAddress.TryParse(ipString, out IPAddress _)) + { + errors.Add("IP Address is invalid."); + } - if (string.IsNullOrWhiteSpace(managerCode)) - { - errors.Add("Manager code is required."); - } - else - { - var managerCodes = _configuration.GetSection(CONFIG_MANAGERCODES).Get>() ?? new List(); - if (!managerCodes.Any(c => c.Code.Equals(managerCode, StringComparison.OrdinalIgnoreCase))) - { - errors.Add("Manager code is invalid."); - } - } + if (port <= ushort.MinValue || port >= ushort.MaxValue) + { + errors.Add($"Valid port is required ({ushort.MinValue} to {ushort.MaxValue})."); + } - if (string.IsNullOrWhiteSpace(ipString)) - { - errors.Add("IP Address is required."); - } - else if (!IPAddress.TryParse(ipString, out IPAddress _)) - { - errors.Add("IP Address is invalid."); - } - - if (port <= ushort.MinValue || port >= ushort.MaxValue) - { - errors.Add($"Valid port is required ({ushort.MinValue} to {ushort.MaxValue})."); - } - - if (errors.Count > 0) - { - throw new ServerManagerApiException(StatusCodes.Status400BadRequest, errors); - } + if (errors.Count > 0) + { + throw new ServerManagerApiException(StatusCodes.Status400BadRequest, errors); } } } diff --git a/src/ServerManager.WebApplication/Startup.cs b/src/ServerManager.WebApplication/Startup.cs index 764fd55e..8d153d1c 100644 --- a/src/ServerManager.WebApplication/Startup.cs +++ b/src/ServerManager.WebApplication/Startup.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApiExplorer; @@ -7,95 +8,101 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using ServerManager.WebApplication.Extensions; -using ServerManager.WebApplication.Services; +using ServerManager.WebApplication.Middleware; -namespace ServerManager.WebApplication +namespace ServerManager.WebApplication; + +public class Startup { - public class Startup + public Startup(IConfiguration configuration) { - public Startup(IConfiguration configuration) + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + + services.AddResponseCaching(); + + /* + * https://github.com/Microsoft/aspnet-api-versioning/wiki + */ + services.AddApiVersioning(o => { - Configuration = configuration; + o.DefaultApiVersion = ApiVersion.Default; + o.AssumeDefaultVersionWhenUnspecified = true; + o.ReportApiVersions = true; + o.ApiVersionReader = ApiVersionReader.Combine( + new MediaTypeApiVersionReader("Version"), + new HeaderApiVersionReader("X-Version") + ); + }); + + services.AddVersionedApiExplorer(o => + { + // add the versioned api explorer, which also adds IApiVersionDescriptionProvider service + // note: the specified format code will format the version as "'v'major[.minor][-status]" + o.GroupNameFormat = "'v'VVV"; + }); + + services.AddServerQueryServices(Configuration); + + services.AddSwaggerGen(o => + { + o.OperationFilter(); + }); + + services.AddHealthChecks(); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IApiVersionDescriptionProvider provider) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); } - public IConfiguration Configuration { get; } - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) + var enableSwagger = Configuration.GetValue("EnableSwagger"); + if (enableSwagger) { - services.AddControllers(); - - services.AddResponseCaching(); - - /* - * https://github.com/Microsoft/aspnet-api-versioning/wiki - */ - services.AddApiVersioning(o => + var swaggerRoutePrefix = Configuration.GetValue("SwaggerRoutePrefix"); + if (!string.IsNullOrWhiteSpace(swaggerRoutePrefix) && !swaggerRoutePrefix.EndsWith("/")) { - o.DefaultApiVersion = ApiVersion.Default; - o.AssumeDefaultVersionWhenUnspecified = true; - o.ReportApiVersions = true; - o.ApiVersionReader = ApiVersionReader.Combine( - new MediaTypeApiVersionReader("Version"), - new HeaderApiVersionReader("X-Version") - ); - }); - - services.AddVersionedApiExplorer(o => - { - // add the versioned api explorer, which also adds IApiVersionDescriptionProvider service - // note: the specified format code will format the version as "'v'major[.minor][-status]" - o.GroupNameFormat = "'v'VVV"; - }); - - services.AddScoped(); - - services.AddSwaggerGen(o => - { - o.OperationFilter(); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IApiVersionDescriptionProvider provider) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); + swaggerRoutePrefix += "/"; } - var enableSwagger = Configuration.GetValue("EnableSwagger"); - if (enableSwagger) + app.UseSwagger(); + app.UseSwaggerUI(o => { - var swaggerRoutePrefix = Configuration.GetValue("SwaggerRoutePrefix"); - if (!string.IsNullOrWhiteSpace(swaggerRoutePrefix) && !swaggerRoutePrefix.EndsWith("/")) + // build a swagger endpoint for each discovered API version + foreach (var description in provider.ApiVersionDescriptions) { - swaggerRoutePrefix += "/"; + o.SwaggerEndpoint($"/{swaggerRoutePrefix}swagger/{description.GroupName}/swagger.json", $"Server Managers API {description.GroupName.ToUpperInvariant()}"); } - - app.UseSwagger(); - app.UseSwaggerUI(o => - { - // build a swagger endpoint for each discovered API version - foreach (var description in provider.ApiVersionDescriptions) - { - o.SwaggerEndpoint($"/{swaggerRoutePrefix}swagger/{description.GroupName}/swagger.json", $"Server Managers API {description.GroupName.ToUpperInvariant()}"); - } - }); - } - - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseResponseCaching(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); }); } + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseResponseCaching(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + endpoints.MapHealthChecks("/api/health", new HealthCheckOptions() + { + AllowCachingResponses = false + }); + }); } } diff --git a/src/ServerManager.WebApplication/appsettings.Development.json b/src/ServerManager.WebApplication/appsettings.Development.json index 5c6e6163..8fd58787 100644 --- a/src/ServerManager.WebApplication/appsettings.Development.json +++ b/src/ServerManager.WebApplication/appsettings.Development.json @@ -7,13 +7,15 @@ } }, - "EnableSwagger": false, + "EnableSwagger": true, "SwaggerRoutePrefix": "", - "ManagerCodes": [ - { - "Name": "Unknown", - "Code": "00000000-0000-0000-0000-000000000000" - } - ] + "ServerQuerySettings": { + "ManagerCodes": [ + { + "Name": "Unknown", + "Code": "00000000-0000-0000-0000-000000000000" + } + ] + } } diff --git a/src/ServerManager.WebApplication/appsettings.Production.json b/src/ServerManager.WebApplication/appsettings.Production.json index 62b30448..28acc945 100644 --- a/src/ServerManager.WebApplication/appsettings.Production.json +++ b/src/ServerManager.WebApplication/appsettings.Production.json @@ -2,18 +2,20 @@ "EnableSwagger": false, "SwaggerRoutePrefix": "", - "ManagerCodes": [ - { - "Name": "Unknown", - "Code": "00000000-0000-0000-0000-000000000000" - }, - { - "Name": "Ark", - "Code": "6DCE02B1-8F41-4AF8-A6EA-E2E026CAB023" - }, - { - "Name": "Conan", - "Code": "03F9106D-2B7B-411A-B533-FB641C44218D" - } - ] + "ServerQuerySettings": { + "ManagerCodes": [ + { + "Name": "Unknown", + "Code": "00000000-0000-0000-0000-000000000000" + }, + { + "Name": "Ark", + "Code": "6DCE02B1-8F41-4AF8-A6EA-E2E026CAB023" + }, + { + "Name": "Conan", + "Code": "03F9106D-2B7B-411A-B533-FB641C44218D" + } + ] + } }