mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix: Change org ID to org slug
This commit is contained in:
@@ -199,19 +199,19 @@ export const useGetWorkspaceIntegrations = (workspaceId: string) =>
|
||||
});
|
||||
|
||||
export const createWorkspace = ({
|
||||
organizationId,
|
||||
organizationSlug,
|
||||
projectName
|
||||
}: CreateWorkspaceDTO): Promise<{ data: { project: Workspace } }> => {
|
||||
return apiRequest.post("/api/v2/workspace", { projectName, organizationId });
|
||||
return apiRequest.post("/api/v2/workspace", { projectName, organizationSlug });
|
||||
};
|
||||
|
||||
export const useCreateWorkspace = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<{ data: { project: Workspace } }, {}, CreateWorkspaceDTO>({
|
||||
mutationFn: async ({ organizationId, projectName }) =>
|
||||
mutationFn: async ({ organizationSlug, projectName }) =>
|
||||
createWorkspace({
|
||||
organizationId,
|
||||
organizationSlug,
|
||||
projectName
|
||||
}),
|
||||
onSuccess: () => {
|
||||
|
||||
@@ -45,7 +45,7 @@ export type TGetUpgradeProjectStatusDTO = {
|
||||
// mutation dto
|
||||
export type CreateWorkspaceDTO = {
|
||||
projectName: string;
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
};
|
||||
|
||||
export type RenameWorkspaceDTO = { workspaceID: string; newWorkspaceName: string };
|
||||
|
||||
Reference in New Issue
Block a user