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); }
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); }