fix Issue : 723
This commit is contained in:
parent
4970659f0a
commit
ddb541c819
7 changed files with 1362 additions and 3 deletions
|
|
@ -397,6 +397,34 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
public GetUserOCIdDto? GetUserOC(Guid keycloakId, string? accessToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var apiPath = $"{_configuration["API"]}/org/dotnet/user-oc/{keycloakId}";
|
||||
var apiKey = _configuration["API_KEY"];
|
||||
|
||||
var apiResult = GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
|
||||
if (apiResult.Result != null)
|
||||
{
|
||||
var raw = JsonConvert.DeserializeObject<GetUserOCIdDto>(apiResult.Result);
|
||||
|
||||
return raw;
|
||||
|
||||
//if (raw == null || raw.RootId == null)
|
||||
// return Guid.Empty;
|
||||
//return raw.RootId;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public Guid? GetRootOcId(Guid ocId, string? accessToken)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue