Skip to content

Commit 07a0d27

Browse files
authored
ref: Use organization_slug instead of org_id for project creation (supabase#36629)
1 parent 2808931 commit 07a0d27

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

apps/studio/data/projects/project-create-mutation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const WHITELIST_ERRORS = [
2121

2222
export type ProjectCreateVariables = {
2323
name: string
24-
organizationId: number
24+
organizationSlug: string
2525
dbPass: string
2626
dbRegion: string
2727
dbSql?: string
@@ -38,7 +38,7 @@ export type ProjectCreateVariables = {
3838

3939
export async function createProject({
4040
name,
41-
organizationId,
41+
organizationSlug,
4242
dbPass,
4343
dbRegion,
4444
dbSql,
@@ -53,7 +53,7 @@ export async function createProject({
5353
}: ProjectCreateVariables) {
5454
const body: components['schemas']['CreateProjectBody'] = {
5555
cloud_provider: cloudProvider,
56-
org_id: organizationId,
56+
organization_slug: organizationSlug,
5757
name,
5858
db_pass: dbPass,
5959
db_region: dbRegion,

apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ const CreateProject = () => {
137137
async function onCreateProject() {
138138
if (!organizationIntegration) return console.error('No organization installation details found')
139139
if (!organizationIntegration?.id) return console.error('No organization installation ID found')
140-
if (!foreignProjectId) return console.error('No foreignProjectId ID set')
141-
if (!organization) return console.error('No organization ID set')
140+
if (!foreignProjectId) return console.error('No foreignProjectId set')
141+
if (!organization) return console.error('No organization set')
142142

143143
snapshot.setLoading(true)
144144

@@ -150,7 +150,7 @@ const CreateProject = () => {
150150
}
151151

152152
createProject({
153-
organizationId: organization.id,
153+
organizationSlug: organization.slug,
154154
name: projectName,
155155
dbPass,
156156
dbRegion,

apps/studio/pages/new/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ const Wizard: NextPageWithLayout = () => {
368368

369369
const data: ProjectCreateVariables = {
370370
cloudProvider: cloudProvider,
371-
organizationId: currentOrg.id,
371+
organizationSlug: currentOrg.slug,
372372
name: projectName,
373373
dbPass: dbPass,
374374
dbRegion: dbRegion,

0 commit comments

Comments
 (0)