public async Task <TaskDetailsDto> Handle(DenyTaskCompletionCommand request, CancellationToken cancellationToken) { if (!_authService.UserRoleAdmin()) { throw new AuthenticationException(); } var taskFromDb = await _taskService.GetTaskWithEagerLoadingAsync(request.TaskId); await _taskService.ChangeTasksAdminApprovalState(taskFromDb); await _emailService.SendEmailAsync(taskFromDb); return(_mapper.Map <TaskDetailsDto>(taskFromDb)); }