Merge branch 'develop' into dev
* develop: เปลี่ยนเส้น call api สำหรับเก็บ logs SystemName = "recruiting"
This commit is contained in:
commit
d107a1d649
1 changed files with 6 additions and 3 deletions
|
|
@ -28,7 +28,8 @@ namespace BMA.EHR.Recruit.Service.Core
|
||||||
|
|
||||||
Uri = _configuration["ElasticConfiguration:Uri"] ?? "http://192.168.1.40:9200";
|
Uri = _configuration["ElasticConfiguration:Uri"] ?? "http://192.168.1.40:9200";
|
||||||
IndexFormat = _configuration["ElasticConfiguration:IndexFormat"] ?? "bma-ehr-log-index";
|
IndexFormat = _configuration["ElasticConfiguration:IndexFormat"] ?? "bma-ehr-log-index";
|
||||||
SystemName = _configuration["ElasticConfiguration:SystemName"] ?? "Unknown";
|
//SystemName = _configuration["ElasticConfiguration:SystemName"] ?? "Unknown";
|
||||||
|
SystemName = "recruiting";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task<string> GetExternalAPIAsync(string apiPath, string accessToken, string apiKey)
|
protected async Task<string> GetExternalAPIAsync(string apiPath, string accessToken, string apiKey)
|
||||||
|
|
@ -70,7 +71,8 @@ namespace BMA.EHR.Recruit.Service.Core
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak/{keycloakId}";
|
//var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak/{keycloakId}";
|
||||||
|
var apiPath = $"{_configuration["API"]}/org/dotnet/user-logs/{keycloakId}";
|
||||||
var apiKey = _configuration["API_KEY"] ?? "";
|
var apiKey = _configuration["API_KEY"] ?? "";
|
||||||
|
|
||||||
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
|
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
|
||||||
|
|
@ -245,7 +247,8 @@ namespace BMA.EHR.Recruit.Service.Core
|
||||||
{
|
{
|
||||||
logType = logType,
|
logType = logType,
|
||||||
ip = context.Connection.RemoteIpAddress?.ToString(),
|
ip = context.Connection.RemoteIpAddress?.ToString(),
|
||||||
rootId = pf == null ? null : pf.RootId,
|
//rootId = pf == null ? null : pf.RootId,
|
||||||
|
rootId = pf == null ? null : pf.RootDnaId,
|
||||||
systemName = SystemName,
|
systemName = SystemName,
|
||||||
startTimeStamp = startTime.ToString("o"),
|
startTimeStamp = startTime.ToString("o"),
|
||||||
endTimeStamp = endTime.ToString("o"),
|
endTimeStamp = endTime.ToString("o"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue