From f50957985300c3bfc6ae5564d7eaa67e099ca8f2 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 10 Dec 2020 13:45:35 +0200 Subject: Change HTTP port --- API/Controllers/ErrorController.cs | 13 ++++++++++ API/Controllers/WeatherForecastController.cs | 37 ---------------------------- 2 files changed, 13 insertions(+), 37 deletions(-) create mode 100644 API/Controllers/ErrorController.cs delete mode 100644 API/Controllers/WeatherForecastController.cs (limited to 'API/Controllers') diff --git a/API/Controllers/ErrorController.cs b/API/Controllers/ErrorController.cs new file mode 100644 index 0000000..4c5d9ef --- /dev/null +++ b/API/Controllers/ErrorController.cs @@ -0,0 +1,13 @@ +using System; + +namespace API.Controllers +{ + public class ErrorController + { + //FIXME: SHOULD NOT BE VOID + public void Error(Exception exception) + { + + } + } +} \ No newline at end of file diff --git a/API/Controllers/WeatherForecastController.cs b/API/Controllers/WeatherForecastController.cs deleted file mode 100644 index a90538d..0000000 --- a/API/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; - -namespace API.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private readonly ILogger _logger; - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} -- cgit v1.2.3