This commit is contained in:
parent
f6594f9773
commit
0c9ec3dd43
5 changed files with 99 additions and 70 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue