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)); } }