-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(issue-229): fix the bug of docker-compose
Merge pull request #230 from live-dev999/live-dev999/issue229
- Loading branch information
Showing
5 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/Services/auth/O2NextGen.Auth.Web/Controllers/VersionController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Reflection; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace O2NextGen.Auth.Web.Controllers | ||
{ | ||
|
||
[AllowAnonymous] | ||
public class VersionController : ControllerBase | ||
{ | ||
#region Fields | ||
|
||
private readonly IHostingEnvironment _environment; | ||
private readonly ILogger<VersionController> _logger; | ||
|
||
#endregion | ||
|
||
|
||
#region Ctors | ||
|
||
public VersionController(IHostingEnvironment environment, ILogger<VersionController> logger) | ||
{ | ||
_environment = environment; | ||
_logger = logger; | ||
} | ||
|
||
#endregion | ||
|
||
[HttpGet("[controller]")] | ||
public object Index() | ||
{ | ||
var exVersion = Assembly.GetExecutingAssembly().GetName().Version; | ||
_logger.LogInformation($"get version - {exVersion}"); | ||
return new | ||
{ | ||
Environment = _environment.EnvironmentName, | ||
Version = exVersion.ToString() | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters