From a2615c7b52335ef99209ae127aa3ab174302ec15 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Sun, 30 Jun 2024 21:42:05 +0700 Subject: [PATCH] fix api Error --- BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs | 3 ++- BMA.EHR.Application/Repositories/UserProfileRepository.cs | 2 +- BMA.EHR.Report.Service/appsettings.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs index 857885fe..c5d2a8f6 100644 --- a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs +++ b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs @@ -5804,7 +5804,8 @@ namespace BMA.EHR.Application.Repositories Id = h.Id, CitizenId = h.Profile.CitizenId, ProfileId = h.Profile.Id, - ProfileType = h.Profile.ProfileType, + ProfileType = "officer", + //ProfileType = h.Profile.ProfileType, FullName = $"{h.Profile.Prefix}{h.Profile.FirstName} {h.Profile.LastName}", Position = h.Profile.Position, PosNo = h.Profile.ProfileSalary == null || h.Profile.ProfileSalary.Count == 0 ? "" : diff --git a/BMA.EHR.Application/Repositories/UserProfileRepository.cs b/BMA.EHR.Application/Repositories/UserProfileRepository.cs index 7a208f54..ea8bae3a 100644 --- a/BMA.EHR.Application/Repositories/UserProfileRepository.cs +++ b/BMA.EHR.Application/Repositories/UserProfileRepository.cs @@ -450,7 +450,7 @@ namespace BMA.EHR.Application.Repositories { try { - var apiPath = $"{_configuration["API"]}/org/dotnet/profile/{id}"; + var apiPath = $"{_configuration["API"]}/org/profile/{id}"; var apiResult = GetExternalAPIAsync(apiPath, accessToken ?? ""); if (apiResult.Result != null) diff --git a/BMA.EHR.Report.Service/appsettings.json b/BMA.EHR.Report.Service/appsettings.json index af177b76..4e60742a 100644 --- a/BMA.EHR.Report.Service/appsettings.json +++ b/BMA.EHR.Report.Service/appsettings.json @@ -57,5 +57,5 @@ ] }, "APIPROBATION": "https://bma-ehr.frappet.synology.me/api/v1/probation/", - "API": "https://bma-ehr.frappet.synology.me/api/v1/" + "API": "https://bma-ehr.frappet.synology.me/api/v1" } \ No newline at end of file