コード例 #1
0
        public static AppCreatedDto FromResult(EntityCreatedResult <Guid> result, IAppPlansProvider apps)
        {
            var response = new AppCreatedDto
            {
                Id          = result.IdOrValue.ToString(),
                Permission  = AppContributorPermission.Owner,
                PlanName    = apps.GetPlan(null)?.Name,
                PlanUpgrade = apps.GetPlanUpgrade(null)?.Name,
                Version     = result.Version
            };

            return(response);
        }
コード例 #2
0
ファイル: AppCreatedDto.cs プロジェクト: pushrbx/squidex
        public static AppCreatedDto FromResult(string name, EntityCreatedResult <Guid> result, IAppPlansProvider apps)
        {
            var response = new AppCreatedDto
            {
                Id          = result.IdOrValue.ToString(),
                Permissions = Role.CreateOwner(name).Permissions.ToIds().ToArray(),
                PlanName    = apps.GetPlan(null)?.Name,
                PlanUpgrade = apps.GetPlanUpgrade(null)?.Name,
                Version     = result.Version
            };

            return(response);
        }