Change Call Org

This commit is contained in:
harid 2026-01-29 13:22:41 +07:00
parent 4c189fdc4a
commit e80f89117c
5 changed files with 93 additions and 37 deletions

View file

@ -209,6 +209,29 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<GetProfileByKeycloakIdDto?> GetProfileByKeycloakIdNew2Async(Guid keycloakId, string? accessToken)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak2/{keycloakId}";
var apiKey = _configuration["API_KEY"];
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
if (apiResult != null)
{
var raw = JsonConvert.DeserializeObject<GetProfileByKeycloakIdResultDto>(apiResult);
if (raw != null)
return raw.Result;
}
return null;
}
catch
{
throw;
}
}
public async Task<GetProfileLeaveByKeycloakDto?> GetProfileLeaveByKeycloakIdAsync(Guid keycloakId, string? accessToken)
{