From 40836584725f21f89c8ddc67f46d329b1d4429c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20P=C3=A9rez=20Ngounou?= Date: Wed, 1 Feb 2023 11:45:48 +0100 Subject: [PATCH] commit --- Sources/API Gateway/API Gateway.csproj | 2 +- .../ApiBowlingGateway.csproj | 13 -------- .../Controllers/WeatherForecastController.cs | 32 ------------------- Sources/ApiBowlingGateway/Program.cs | 25 --------------- .../Properties/launchSettings.json | 31 ------------------ Sources/ApiBowlingGateway/WeatherForecast.cs | 12 ------- .../appsettings.Development.json | 8 ----- Sources/ApiBowlingGateway/appsettings.json | 9 ------ Sources/Solution.sln | 6 ---- 9 files changed, 1 insertion(+), 137 deletions(-) delete mode 100644 Sources/ApiBowlingGateway/ApiBowlingGateway.csproj delete mode 100644 Sources/ApiBowlingGateway/Controllers/WeatherForecastController.cs delete mode 100644 Sources/ApiBowlingGateway/Program.cs delete mode 100644 Sources/ApiBowlingGateway/Properties/launchSettings.json delete mode 100644 Sources/ApiBowlingGateway/WeatherForecast.cs delete mode 100644 Sources/ApiBowlingGateway/appsettings.Development.json delete mode 100644 Sources/ApiBowlingGateway/appsettings.json diff --git a/Sources/API Gateway/API Gateway.csproj b/Sources/API Gateway/API Gateway.csproj index b07c047..7c29b72 100644 --- a/Sources/API Gateway/API Gateway.csproj +++ b/Sources/API Gateway/API Gateway.csproj @@ -1,7 +1,7 @@ - net7.0 + net6.0 enable enable API_Gateway diff --git a/Sources/ApiBowlingGateway/ApiBowlingGateway.csproj b/Sources/ApiBowlingGateway/ApiBowlingGateway.csproj deleted file mode 100644 index 6108b7b..0000000 --- a/Sources/ApiBowlingGateway/ApiBowlingGateway.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net6.0 - enable - enable - - - - - - - diff --git a/Sources/ApiBowlingGateway/Controllers/WeatherForecastController.cs b/Sources/ApiBowlingGateway/Controllers/WeatherForecastController.cs deleted file mode 100644 index 8f00957..0000000 --- a/Sources/ApiBowlingGateway/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace ApiBowlingGateway.Controllers; - -[ApiController] -[Route("[controller]")] -public class WeatherForecastController : ControllerBase -{ - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet(Name = "GetWeatherForecast")] - public IEnumerable Get() - { - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }) - .ToArray(); - } -} \ No newline at end of file diff --git a/Sources/ApiBowlingGateway/Program.cs b/Sources/ApiBowlingGateway/Program.cs deleted file mode 100644 index 8264bac..0000000 --- a/Sources/ApiBowlingGateway/Program.cs +++ /dev/null @@ -1,25 +0,0 @@ -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. - -builder.Services.AddControllers(); -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(); -} - -app.UseHttpsRedirection(); - -app.UseAuthorization(); - -app.MapControllers(); - -app.Run(); \ No newline at end of file diff --git a/Sources/ApiBowlingGateway/Properties/launchSettings.json b/Sources/ApiBowlingGateway/Properties/launchSettings.json deleted file mode 100644 index 8e94ae6..0000000 --- a/Sources/ApiBowlingGateway/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:5750", - "sslPort": 44320 - } - }, - "profiles": { - "ApiBowlingGateway": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:7051;http://localhost:5264", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/Sources/ApiBowlingGateway/WeatherForecast.cs b/Sources/ApiBowlingGateway/WeatherForecast.cs deleted file mode 100644 index 6a07ed5..0000000 --- a/Sources/ApiBowlingGateway/WeatherForecast.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace ApiBowlingGateway; - -public class WeatherForecast -{ - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } -} \ No newline at end of file diff --git a/Sources/ApiBowlingGateway/appsettings.Development.json b/Sources/ApiBowlingGateway/appsettings.Development.json deleted file mode 100644 index 0c208ae..0000000 --- a/Sources/ApiBowlingGateway/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/Sources/ApiBowlingGateway/appsettings.json b/Sources/ApiBowlingGateway/appsettings.json deleted file mode 100644 index 10f68b8..0000000 --- a/Sources/ApiBowlingGateway/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff --git a/Sources/Solution.sln b/Sources/Solution.sln index 1072afa..2302b11 100644 --- a/Sources/Solution.sln +++ b/Sources/Solution.sln @@ -39,8 +39,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphQL Project", "GraphQL EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API Gateway", "API Gateway\API Gateway.csproj", "{20E9E8DF-B3CA-4F4C-9B16-5E880158C43C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiBowlingGateway", "ApiBowlingGateway\ApiBowlingGateway.csproj", "{C3274794-8D2A-4695-B8B5-7B0B7B65C917}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -95,10 +93,6 @@ Global {20E9E8DF-B3CA-4F4C-9B16-5E880158C43C}.Debug|Any CPU.Build.0 = Debug|Any CPU {20E9E8DF-B3CA-4F4C-9B16-5E880158C43C}.Release|Any CPU.ActiveCfg = Release|Any CPU {20E9E8DF-B3CA-4F4C-9B16-5E880158C43C}.Release|Any CPU.Build.0 = Release|Any CPU - {C3274794-8D2A-4695-B8B5-7B0B7B65C917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3274794-8D2A-4695-B8B5-7B0B7B65C917}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3274794-8D2A-4695-B8B5-7B0B7B65C917}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C3274794-8D2A-4695-B8B5-7B0B7B65C917}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE