lock insignia
Some checks failed
release-dev / release-dev (push) Failing after 12s

This commit is contained in:
kittapath 2025-08-01 17:08:11 +07:00
parent f6594f9773
commit 0c9ec3dd43
5 changed files with 99 additions and 70 deletions

View file

@ -1188,6 +1188,29 @@ namespace BMA.EHR.Application.Repositories
throw;
}
}
public GetOrgProfileByProfileIdDto GetOrgProfileByProfileId(Guid id, string? accessToken)
{
try
{
var apiPath = $"{_configuration["API"]}/org/profile/org-user/{id}";
var apiKey = _configuration["API_KEY"];
var apiResult = GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
if (apiResult.Result != null)
{
var raw = JsonConvert.DeserializeObject<GetOrgProfileByProfileIdResultDto>(apiResult.Result);
if (raw != null)
return raw.Result;
}
return null;
}
catch
{
throw;
}
}
#endregion
}
}