Merge branch 'develop' into dev

* develop:
  เปลี่ยนเส้น call api สำหรับเก็บ logs
  SystemName = "recruiting"
This commit is contained in:
Warunee Tamkoo 2026-01-29 11:05:42 +07:00
commit d107a1d649

View file

@ -28,7 +28,8 @@ namespace BMA.EHR.Recruit.Service.Core
Uri = _configuration["ElasticConfiguration:Uri"] ?? "http://192.168.1.40:9200";
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)
@ -70,7 +71,8 @@ namespace BMA.EHR.Recruit.Service.Core
{
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 apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
@ -245,7 +247,8 @@ namespace BMA.EHR.Recruit.Service.Core
{
logType = logType,
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,
startTimeStamp = startTime.ToString("o"),
endTimeStamp = endTime.ToString("o"),