public async Task <IActionResult> GetOrganizationById(Guid organizationId)
        {
            var organization = await _organizationQueryService.GetOrganizationById(organizationId);

            if (organization == null)
            {
                return(this.NotFound());
            }

            var projects = await this._projectQueryService.GetProjectsWithServices(organizationId);

            var configurationManagementServices = await _organizationCMSQueryService.GetOrganizationConfigurationManagementServices(organizationId, Domain.Models.Enums.CMSConnectionType.ProjectLevel);

            var cloudProviderServices = await _organizationCPSQueryService.GetOrganizationCloudProviderServices(organizationId);

            var users = await _organizationUserQueryService.GetUsers(organizationId);

            var invitations = await _organizationUserInvitationQueryService.GetInvitations(organizationId);

            var model = new {
                organization = organization,
                projects     = projects,
                cms          = configurationManagementServices,
                cps          = cloudProviderServices,
                users        = users,
                invitations  = invitations
            };

            return(this.Ok(model));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetOrganizationById(Guid organizationId)
        {
            var organization = await _organizationQueryService.GetOrganizationById(organizationId);

            if (organization == null)
            {
                return(this.NotFound());
            }

            return(this.Ok(organization));
        }