From 2760c5e25a891e3da717fcba72bc7c1640521b90 Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Thu, 4 Sep 2025 23:33:47 +0100 Subject: [PATCH 1/2] remove weather api --- .../Controllers/WeatherForecastController.cs | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/DemoAPI/Controllers/WeatherForecastController.cs diff --git a/src/DemoAPI/Controllers/WeatherForecastController.cs b/src/DemoAPI/Controllers/WeatherForecastController.cs deleted file mode 100644 index 41beadb..0000000 --- a/src/DemoAPI/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace DemoAPI.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - [HttpGet("hello")] - public IActionResult GetHello() - { - return Ok(new - { - message = "Hello, world!", - timestamp = DateTime.UtcNow - }); - } - - [HttpGet("time")] - public IActionResult GetTime() - { - return Ok(new - { - serverTime = DateTime.UtcNow, - note = "This endpoint is rate limited!" - }); - } - } -} From 3a5560db7a015506afd0349e10b03491493d55e5 Mon Sep 17 00:00:00 2001 From: Raphael Anyanwu Date: Thu, 4 Sep 2025 23:33:58 +0100 Subject: [PATCH 2/2] use home controller --- src/DemoAPI/Controllers/HomeController.cs | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/DemoAPI/Controllers/HomeController.cs diff --git a/src/DemoAPI/Controllers/HomeController.cs b/src/DemoAPI/Controllers/HomeController.cs new file mode 100644 index 0000000..f78ffa3 --- /dev/null +++ b/src/DemoAPI/Controllers/HomeController.cs @@ -0,0 +1,29 @@ +using Microsoft.AspNetCore.Mvc; + +namespace DemoAPI.Controllers +{ + [ApiController] + [Route("[controller]")] + public class HomeController : ControllerBase + { + [HttpGet("hello")] + public IActionResult GetHello() + { + return Ok(new + { + message = "Hello, world!", + timestamp = DateTime.UtcNow + }); + } + + [HttpGet("time")] + public IActionResult GetTime() + { + return Ok(new + { + serverTime = DateTime.UtcNow, + note = "This endpoint is rate limited!" + }); + } + } +}