public async Task <IActionResult> AddTeam(Guid projectId, Guid teamId) { var id = User.Claims.Where(c => c.Type == "Id").Select(c => c.Value).SingleOrDefault(); if (String.IsNullOrEmpty(id)) { return(Unauthorized()); } Guid actorId = new Guid(id); try { await _projectsService.AddTeam(projectId, teamId, actorId); return(Ok()); } catch (Exception e) { return(BadRequest(e.Message)); } }