ปรับ api ให้รับ keycloak id จาก token
Some checks failed
release-dev / release-dev (push) Failing after 12s
Some checks failed
release-dev / release-dev (push) Failing after 12s
This commit is contained in:
parent
7098a8620d
commit
049a289467
1 changed files with 5 additions and 5 deletions
|
|
@ -553,13 +553,13 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
[HttpGet("check-status/{id:guid}")]
|
||||
[HttpGet("check-status")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<ResponseObject>> CheckInCheckStatus(Guid id)
|
||||
public async Task<ActionResult<ResponseObject>> CheckInCheckStatus()
|
||||
{
|
||||
var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId);
|
||||
var currentDate = DateTime.Now;
|
||||
var channel = _objectPool.Get();
|
||||
try
|
||||
|
|
@ -612,9 +612,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
}
|
||||
|
||||
// Step 3: ค้นหา taskIds ที่อยู่ใน messages ทั้งหมด
|
||||
var foundTasks = allMessages.FirstOrDefault(x => x.Contains(id.ToString("D")));
|
||||
var foundTasks = allMessages.FirstOrDefault(x => x.Contains(userId.ToString("D")));
|
||||
|
||||
return Success(new { taskId = id, InQueue = foundTasks != null });
|
||||
return Success(new { keycloakId = userId, InQueue = foundTasks != null });
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue