mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: remove project creation
This commit is contained in:
@@ -30,19 +30,13 @@
|
||||
try {
|
||||
// Create free organization if coming from onboarding
|
||||
if ($page.url.pathname.includes('/console/onboarding')) {
|
||||
const freeOrg = await sdk.forConsole.billing.createOrganization(
|
||||
await sdk.forConsole.billing.createOrganization(
|
||||
ID.unique(),
|
||||
'Personal Projects',
|
||||
BillingPlan.STARTER,
|
||||
null,
|
||||
null
|
||||
);
|
||||
await sdk.forConsole.projects.create(
|
||||
ID.unique(),
|
||||
'My first project',
|
||||
freeOrg.$id,
|
||||
'fra'
|
||||
);
|
||||
}
|
||||
|
||||
const org = await sdk.forConsole.billing.createOrganization(
|
||||
@@ -88,18 +82,6 @@
|
||||
members_invited: $createOrganization?.collaborators?.length
|
||||
});
|
||||
|
||||
// Create first pro project if onboarding
|
||||
if ($page.url.pathname.includes('/console/onboarding')) {
|
||||
await sdk.forConsole.projects.create(
|
||||
ID.unique(),
|
||||
'My first Pro project',
|
||||
org.$id,
|
||||
'fra'
|
||||
);
|
||||
|
||||
trackEvent(Submit.ProjectCreate);
|
||||
}
|
||||
|
||||
await invalidate(Dependencies.ACCOUNT);
|
||||
await preloadData(`/console/organization-${org.$id}`);
|
||||
await goto(`/console/organization-${org.$id}`);
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
let plan: Tier;
|
||||
|
||||
const options = [
|
||||
{ value: BillingPlan.STARTER, label: 'Starter - $0/billing period' },
|
||||
{ value: BillingPlan.PRO, label: 'Pro - $15/billing period + add-ons' }
|
||||
{ value: BillingPlan.STARTER, label: 'Starter - $0/month' },
|
||||
{ value: BillingPlan.PRO, label: 'Pro - $15/month + add-ons' }
|
||||
];
|
||||
|
||||
onMount(() => {
|
||||
@@ -56,12 +56,6 @@
|
||||
customId: !!id,
|
||||
plan: tierToPlan(plan)?.name
|
||||
});
|
||||
await sdk.forConsole.projects.create(
|
||||
ID.unique(),
|
||||
'My first project',
|
||||
org.$id,
|
||||
'fra'
|
||||
);
|
||||
await invalidate(Dependencies.ACCOUNT);
|
||||
await goto(`/console/organization-${org.$id}`);
|
||||
addNotification({
|
||||
@@ -84,14 +78,10 @@
|
||||
} else {
|
||||
try {
|
||||
const org = await sdk.forConsole.teams.create(id ?? ID.unique(), orgName);
|
||||
const project = await sdk.forConsole.projects.create(
|
||||
ID.unique(),
|
||||
'My first project',
|
||||
org.$id,
|
||||
'default'
|
||||
);
|
||||
|
||||
await invalidate(Dependencies.ACCOUNT);
|
||||
await goto(`/console/project-${project.$id}`);
|
||||
await goto(`/console/organization-${org.$id}`);
|
||||
|
||||
addNotification({
|
||||
message: `${orgName} organization successfully created`,
|
||||
type: 'success'
|
||||
|
||||
Reference in New Issue
Block a user