เพิ่ม Call API GetProfileByCheckInAsync ใช้แทนของเดิม

This commit is contained in:
Suphonchai Phoonsawat 2026-05-15 16:04:39 +07:00
parent 583569682d
commit e5f6a44f5f
2 changed files with 26 additions and 3 deletions

View file

@ -945,13 +945,13 @@ namespace BMA.EHR.Leave.Service.Controllers
await _checkInJobStatusRepository.UpdateToProcessingAsync(taskId);
}
var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, data.Token);
var profile = await _userProfileRepository.GetProfileByCheckInAsync(userId, data.Token);
if (profile == null)
{
await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "เกิดข้อผิดพลาดจากการเรียก API [GetProfileByKeycloakIdNew2Async] : ไม่พบข้อมูลผู้ใช้");
await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "เกิดข้อผิดพลาดจากการเรียก API [GetProfileByCheckInAsync] : ไม่พบข้อมูลผู้ใช้");
await _notificationService.SendNotificationAsync(data.Token, true,
"เกิดข้อผิดพลาดจากการเรียก API [GetProfileByKeycloakIdNew2Async] : ไม่พบข้อมูลผู้ใช้");
"เกิดข้อผิดพลาดจากการเรียก API [GetProfileByCheckInAsync] : ไม่พบข้อมูลผู้ใช้");
//var staffList = await _userProfileRepository.GetOCStaffAsync(profile)
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
}