コード例 #1
0
ファイル: Mutation.cs プロジェクト: jkelin/supercompose
        public async Task <IQueryable <Deployment> > RedeployDeployment(
            [Required] Guid id,
            [GlobalState("ClaimsPrincipal")] ClaimsPrincipal user
            )
        {
            var deploymentAuth =
                await authorizationService.AuthorizeAsync(user, id,
                                                          new TenantDeploymentRequirement());

            if (deploymentAuth.Failure != null)
            {
                throw new UnauthorizedAccessException();
            }

            await deploymentService.Redeploy(id);

            return(ctxFactiry.CreateDbContext().Deployments.Where(x => x.Id == id));
        }