no message

This commit is contained in:
Kittapath 2024-07-11 00:01:49 +07:00
parent 99027059c5
commit 8411968b17
3 changed files with 983 additions and 4 deletions

View file

@ -144,9 +144,10 @@ namespace BMA.EHR.Placement.Service.Controllers
var inbox = await _context.Inboxes.FirstOrDefaultAsync(x => x.Id == id);
if (inbox == null)
return Error(GlobalMessages.DataNotFound);
if (inbox.CreatedUserId == null || inbox.CreatedUserId == "")
return Error("ข้อความนี้เป็นการแจ้งเตือนจากระบบไม่สามารถตอบกลับได้");
var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position/{inbox.CreatedUserId}";
var apiUrl = $"{_configuration["API"]}/org/profile/keycloakid/position/{inbox.CreatedUserId}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));