แก้ noti

This commit is contained in:
Kittapath 2024-06-29 01:00:18 +07:00
parent 31ac8f9299
commit 2fc1587d18
3 changed files with 14 additions and 8 deletions

View file

@ -75,12 +75,12 @@ namespace BMA.EHR.Placement.Service.Controllers
[HttpPost("keycloak")]
public async Task<ActionResult<ResponseObject>> UpdatePropertyByUserKeycloak([FromBody] NotiRequest req)
{
var profile = await _context.Profiles.FirstOrDefaultAsync(x => x.KeycloakId == req.ReceiverUserId);
if (profile == null)
return Error(GlobalMessages.DataNotFound);
// var profile = await _context.Profiles.FirstOrDefaultAsync(x => x.KeycloakId == req.ReceiverUserId);
// if (profile == null)
// return Error(GlobalMessages.DataNotFound);
await _repositoryNoti.PushNotificationAsync(
profile.Id,
req.ReceiverUserId,
req.Subject,
req.Body,
req.Payload,