Esempio n. 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);
        }
Esempio n. 2
0
        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);
        }