public async Task <GetSubordinateTopicTreeOperationResponse> Execute() { var employee = await _authorizationContext.CurrentEmployee(); var request = new GetSpecificTeamTopicTreeOperationRequest { EmployeeId = employee.Id }; return(await _getSpecificTeamTopicTreeOperation.Execute(request)); }
public async Task <IActionResult> GetTeamTopicTree([Required] Guid id) { var request = new GetSpecificTeamTopicTreeOperationRequest { EmployeeId = id }; GetSubordinateTopicTreeOperationResponse response; try { response = await _getSpecificTeamTopicTreeOperation.Execute(request); } catch (EmployeeDoesNotManageAnyTeamException ex) { return(NotFound(new ErrorModel(ex.Message))); } return(Ok(new TeamTopicTreeModel(response))); }