From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 5 Oct 2022 20:45:21 +0800 Subject: refactor: Change file structure --- .../Internal/Root/GetApplicationVersionRoute.cs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 server/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs (limited to 'server/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs') diff --git a/server/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs b/server/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs deleted file mode 100644 index 5fb8213..0000000 --- a/server/src/Endpoints/Internal/Root/GetApplicationVersionRoute.cs +++ /dev/null @@ -1,21 +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)); - } -} -- cgit v1.3