fix ccode

This commit is contained in:
Suphonchai Phoonsawat 2025-05-08 22:19:12 +07:00
parent 496917c34c
commit 4cc57322c0
4 changed files with 47 additions and 8 deletions

View file

@ -12,6 +12,7 @@ using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using System.Reflection.Emit;
using System.Security.Cryptography;
using System.Text;
namespace BMA.EHR.Application.Repositories
{
@ -130,7 +131,7 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByRootIdDto>> GetEmployeeProfileByPositionAsync(Guid rootId, dynamic empPosId, string? accessToken)
public async Task<List<GetProfileByRootIdDto>> GetEmployeeProfileByPositionAsync(Guid rootId, string[] empPosId, string? accessToken)
{
try
{
@ -143,6 +144,11 @@ namespace BMA.EHR.Application.Repositories
empPosId
};
//var bodyJson = JsonConvert.SerializeObject(bodyRaw);
// สร้าง HTTP content
//var body = new StringContent(bodyJson, Encoding.UTF8, "application/json");
var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey);
if (apiResult != null)