public WorkTimeReturnDto CorrectWorkTime(int workTimeId, UpdateWorkTimeDto updatedWorkTime) { if (!_workTimeOperations.IsValidWorkTime(workTimeId)) { return(null); } var workTimeRegistration = _workTimeOperations.GetWorkTimeById(workTimeId); return(Mapper.Map <WorkTimeReturnDto>( _workTimeOperations.CorrectWorkTime(workTimeRegistration, updatedWorkTime.UpdatedWorkTime))); }
public IActionResult MakeWorkTimeCorrection(int workTimeId, [FromBody] UpdateWorkTimeDto workTimeUpdate) { return(OkOrBadRequest(_workTimeService.CorrectWorkTime(workTimeId, workTimeUpdate))); }