From 9b1a15331a713b83afe8d6156f13fc0a1d63178a Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:26:45 +0100 Subject: [PATCH] Fix: Creating dummy workspaces --- frontend/src/components/signup/UserInfoStep.tsx | 3 ++- frontend/src/helpers/project.ts | 6 +++--- .../Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/signup/UserInfoStep.tsx b/frontend/src/components/signup/UserInfoStep.tsx index 994ad5a72..43c481763 100644 --- a/frontend/src/components/signup/UserInfoStep.tsx +++ b/frontend/src/components/signup/UserInfoStep.tsx @@ -191,9 +191,10 @@ export default function UserInfoStep({ const userOrgs = await fetchOrganizations(); + const orgSlug = userOrgs[0]?.slug; const orgId = userOrgs[0]?.id; const project = await ProjectService.initProject({ - organizationId: orgId, + organizationSlug: orgSlug, projectName: "Example Project" }); diff --git a/frontend/src/helpers/project.ts b/frontend/src/helpers/project.ts index 06f13dc65..33c9e5777 100644 --- a/frontend/src/helpers/project.ts +++ b/frontend/src/helpers/project.ts @@ -78,17 +78,17 @@ const secretsToBeAdded = [ * @returns {Project} project - new project */ const initProjectHelper = async ({ - organizationId, + organizationSlug, projectName }: { - organizationId: string; + organizationSlug: string; projectName: string; }) => { // create new project const { data: { project } } = await createWorkspace({ - organizationId, + organizationSlug, projectName }); diff --git a/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx b/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx index 918a62551..b5e07286f 100644 --- a/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx +++ b/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx @@ -188,8 +188,9 @@ export const UserInfoSSOStep = ({ const userOrgs = await fetchOrganizations(); const orgId = userOrgs[0]?.id; + const orgSlug = userOrgs[0]?.slug; const project = await ProjectService.initProject({ - organizationId: orgId, + organizationSlug: orgSlug, projectName: "Example Project" });