From 6a30555fa48c873bd3ece5954d34a06e08a612c9 Mon Sep 17 00:00:00 2001 From: Dmitriy yawaflua Andreev Date: Mon, 8 Jul 2024 02:06:39 +0300 Subject: [PATCH] Code cleaning --- Controllers/OembedController.cs | 2 ++ ...eatherForecastController.cs => PayController.cs} | 2 +- WeatherForecast.cs | 13 ------------- 3 files changed, 3 insertions(+), 14 deletions(-) rename Controllers/{WeatherForecastController.cs => PayController.cs} (82%) delete mode 100644 WeatherForecast.cs diff --git a/Controllers/OembedController.cs b/Controllers/OembedController.cs index a689536..a76695b 100644 --- a/Controllers/OembedController.cs +++ b/Controllers/OembedController.cs @@ -10,6 +10,8 @@ namespace OembedTests.Controllers [HttpGet] public async Task GetOembed([FromQuery]string url, [FromQuery] string? format = "json") { + // This is just example + // TODO: rework this plz var userName = url.Replace("https://oembed-test.yawaflua.ru/pay/", ""); var response = $@"{{ ""version"": ""1.0"", diff --git a/Controllers/WeatherForecastController.cs b/Controllers/PayController.cs similarity index 82% rename from Controllers/WeatherForecastController.cs rename to Controllers/PayController.cs index 64fb5cd..a470dab 100644 --- a/Controllers/WeatherForecastController.cs +++ b/Controllers/PayController.cs @@ -4,7 +4,7 @@ namespace OembedTests.Controllers { [ApiController] [Route("pay")] - public class WeatherForecastController : ControllerBase + public class PayController : ControllerBase { [HttpGet("/{userName}")] diff --git a/WeatherForecast.cs b/WeatherForecast.cs deleted file mode 100644 index 84aa3b1..0000000 --- a/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OembedTests -{ - public class WeatherForecast - { - public DateOnly Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -}