From 036f11cdc0f99fd86f576f5335dae844391a0283 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Dec 2022 13:14:52 +0900 Subject: feat: Move /Data into /Models --- .../Internal/Root/GetApplicationVersionRoute.cs | 20 -------------------- code/api/src/Endpoints/Internal/Root/LogRoute.cs | 16 ---------------- 2 files changed, 36 deletions(-) delete mode 100644 code/api/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs delete mode 100644 code/api/src/Endpoints/Internal/Root/LogRoute.cs (limited to 'code/api/src/Endpoints/Internal') diff --git a/code/api/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs b/code/api/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs deleted file mode 100644 index 34180d1..0000000 --- a/code/api/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace IOL.GreatOffice.Api.Endpoints.Internal.Root; - -public class GetApplicationVersionRoute : RouteBaseSync.WithoutRequest.WithActionResult -{ - private readonly IWebHostEnvironment _environment; - - public GetApplicationVersionRoute(IWebHostEnvironment environment) { - _environment = environment; - } - - /// - /// Get the running api version number. - /// - /// - [HttpGet("~/_/version")] - public override ActionResult Handle() { - var versionFilePath = Path.Combine(_environment.WebRootPath, "version.txt"); - return Ok(System.IO.File.ReadAllText(versionFilePath)); - } -} \ No newline at end of file diff --git a/code/api/src/Endpoints/Internal/Root/LogRoute.cs b/code/api/src/Endpoints/Internal/Root/LogRoute.cs deleted file mode 100644 index 2c69e94..0000000 --- a/code/api/src/Endpoints/Internal/Root/LogRoute.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace IOL.GreatOffice.Api.Endpoints.Internal.Root; - -public class LogRoute : RouteBaseSync.WithRequest.WithoutResult -{ - private readonly ILogger _logger; - - public LogRoute(ILogger logger) { - _logger = logger; - } - - [AllowAnonymous] - [HttpPost("~/_/log")] - public override void Handle([FromBody] string request) { - _logger.LogInformation(request); - } -} \ No newline at end of file -- cgit v1.3