chore(root): rename organizationSlug to organizationId (#91)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-11-20 14:04:55 +01:00
committed by GitHub
parent 0221948aab
commit cd16ac878d
52 changed files with 176 additions and 360 deletions

View File

@@ -13,8 +13,8 @@ async function createOrGetOrganization(
input: z.infer<typeof zOnboardingProject>,
userId: string,
) {
if (input.organizationSlug) {
return await getOrganizationBySlug(input.organizationSlug);
if (input.organizationId) {
return await getOrganizationBySlug(input.organizationId);
}
if (input.organization) {
@@ -92,7 +92,6 @@ export const onboardingRouter = createTRPCRouter({
data: {
id: await getId('project', input.project),
name: input.project,
organizationSlug: organization.id,
organizationId: organization.id,
types,
},
@@ -102,7 +101,6 @@ export const onboardingRouter = createTRPCRouter({
const client = await db.client.create({
data: {
name: `${project.name} Client`,
organizationSlug: organization.id,
organizationId: organization.id,
projectId: project.id,
type: 'write',