Example #1
0
        public async Task <IActionResult> GetProjectServices(Guid organizationId, Guid projectId)
        {
            var projectServices = await _projectServiceQueryService.GetProjectServices(organizationId, projectId);

            if (_domainManagerService.HasNotFounds())
            {
                return(this.NotFound(_domainManagerService.GetNotFounds()));
            }

            return(this.Ok(projectServices));
        }
        public async Task <IActionResult> GetProjectById(Guid organizationId, Guid projectId)
        {
            var organization = await _organizationQueryService.GetOrganizationById(organizationId);

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

            var project = await _projectQueryService.GetProjectById(organizationId, projectId);

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

            var activities = await _projectActivityQueryService.GetProjectActivities(organizationId, projectId);

            var environments = await _projectEnvironmentQueryService.GetProjectEnvironments(organizationId, projectId);

            var features = await _projectFeatureQueryService.GetProjectFeatures(organizationId, projectId);

            var services = await _projectServiceQueryService.GetProjectServices(organizationId, projectId);

            var users = await _projectUserQueryService.GetUsers(organizationId, projectId);

            var invitations = await _projectUserInvitationQueryService.GetInvitations(organizationId, projectId);

            var projectProvider = await _projectQueryService.GetProjectExternalById(organizationId, projectId);

            var model = new
            {
                organization    = organization,
                project         = project,
                projectProvider = projectProvider,
                activities      = activities,
                environments    = environments,
                features        = features,
                services        = services,
                users           = users,
                invitations     = invitations
            };

            return(this.Ok(model));
        }