Add GetProfileByProfileIdNoAuthAsync method and update related controller logic
This commit is contained in:
parent
a2ac05ed61
commit
e5e7c77880
4 changed files with 49 additions and 7 deletions
|
|
@ -500,11 +500,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
[HttpPut("schedule")]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<ResponseObject>> ScheduleLeaveBeginning([FromBody] EditLeaveBeginningDto req)
|
||||
public async Task<ActionResult<ResponseObject>> ScheduleUpdateLeaveBeginningAsync([FromBody] EditLeaveBeginningDto req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken);
|
||||
var profile = await _userProfileRepository.GetProfileByProfileIdNoAuthAsync(req.ProfileId, AccessToken);
|
||||
if(profile == null)
|
||||
{
|
||||
return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue