diff --git a/frontend/src/hooks/api/migration/mutations.tsx b/frontend/src/hooks/api/migration/mutations.tsx index c2b903f8a..87ba89eab 100644 --- a/frontend/src/hooks/api/migration/mutations.tsx +++ b/frontend/src/hooks/api/migration/mutations.tsx @@ -3,7 +3,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import { apiRequest } from "@app/config/request"; import { workspaceKeys } from "../workspace"; -import { ProjectType } from "../workspace/types"; export const useImportEnvKey = () => { const queryClient = useQueryClient(); @@ -35,7 +34,7 @@ export const useImportEnvKey = () => { }, onSuccess: () => { queryClient.invalidateQueries({ - queryKey: workspaceKeys.getAllUserWorkspace(ProjectType.SecretManager) + queryKey: workspaceKeys.getAllUserWorkspace() }); } }); diff --git a/frontend/src/hooks/api/organization/queries.tsx b/frontend/src/hooks/api/organization/queries.tsx index 2eddda50a..b5637f049 100644 --- a/frontend/src/hooks/api/organization/queries.tsx +++ b/frontend/src/hooks/api/organization/queries.tsx @@ -42,7 +42,7 @@ export const organizationKeys = { [...organizationKeys.getOrgIdentityMemberships(orgId), params] as const, getOrgGroups: (orgId: string) => [{ orgId }, "organization-groups"] as const, getOrgIntegrationAuths: (orgId: string) => [{ orgId }, "integration-auths"] as const, - getOrgById: (orgId: string) => ["org-by-id", { orgId }] + getOrgById: (orgId: string) => ["organization", { orgId }] }; export const fetchOrganizations = async () => { diff --git a/frontend/src/hooks/api/workspace/mutations.tsx b/frontend/src/hooks/api/workspace/mutations.tsx index a53151840..1ae0efe08 100644 --- a/frontend/src/hooks/api/workspace/mutations.tsx +++ b/frontend/src/hooks/api/workspace/mutations.tsx @@ -4,7 +4,7 @@ import { apiRequest } from "@app/config/request"; import { userKeys } from "../users/query-keys"; import { workspaceKeys } from "./query-keys"; -import { ProjectType, TUpdateWorkspaceGroupRoleDTO } from "./types"; +import { TUpdateWorkspaceGroupRoleDTO } from "./types"; export const useAddGroupToWorkspace = () => { const queryClient = useQueryClient(); @@ -102,7 +102,7 @@ export const useMigrateProjectToV3 = () => { }, onSuccess: () => { queryClient.invalidateQueries({ - queryKey: workspaceKeys.getAllUserWorkspace(ProjectType.SecretManager) + queryKey: workspaceKeys.getAllUserWorkspace() }); } }); diff --git a/frontend/src/hooks/api/workspace/queries.tsx b/frontend/src/hooks/api/workspace/queries.tsx index af692b390..2c7e75a97 100644 --- a/frontend/src/hooks/api/workspace/queries.tsx +++ b/frontend/src/hooks/api/workspace/queries.tsx @@ -86,7 +86,7 @@ export const useUpgradeProject = () => { }, onSuccess: () => { queryClient.invalidateQueries({ - queryKey: workspaceKeys.getAllUserWorkspace(ProjectType.SecretManager) + queryKey: workspaceKeys.getAllUserWorkspace() }); } }); @@ -151,7 +151,7 @@ export const useGetUserWorkspaces = ({ type?: ProjectType | "all"; } = {}) => useQuery({ - queryKey: workspaceKeys.getAllUserWorkspace(type || ""), + queryKey: workspaceKeys.getAllUserWorkspace(), queryFn: () => fetchUserWorkspaces(includeRoles, type) }); @@ -261,8 +261,8 @@ export const useUpdateProject = () => { ); return data.workspace; }, - onSuccess: (dto) => { - queryClient.invalidateQueries({ queryKey: workspaceKeys.getAllUserWorkspace(dto.type) }); + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: workspaceKeys.getAllUserWorkspace() }); } }); }; @@ -280,8 +280,8 @@ export const useToggleAutoCapitalization = () => { ); return data.workspace; }, - onSuccess: (dto) => { - queryClient.invalidateQueries({ queryKey: workspaceKeys.getAllUserWorkspace(dto.type) }); + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: workspaceKeys.getAllUserWorkspace() }); } }); }; @@ -296,8 +296,8 @@ export const useUpdateWorkspaceVersionLimit = () => { }); return data.workspace; }, - onSuccess: (dto) => { - queryClient.invalidateQueries({ queryKey: workspaceKeys.getAllUserWorkspace(dto.type) }); + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: workspaceKeys.getAllUserWorkspace() }); } }); }; @@ -350,7 +350,7 @@ export const useCreateWsEnvironment = () => { }, onSuccess: () => { queryClient.invalidateQueries({ - queryKey: workspaceKeys.getAllUserWorkspace(ProjectType.SecretManager) + queryKey: workspaceKeys.getAllUserWorkspace() }); } }); @@ -369,7 +369,7 @@ export const useUpdateWsEnvironment = () => { }, onSuccess: () => { queryClient.invalidateQueries({ - queryKey: workspaceKeys.getAllUserWorkspace(ProjectType.SecretManager) + queryKey: workspaceKeys.getAllUserWorkspace() }); } }); @@ -384,7 +384,7 @@ export const useDeleteWsEnvironment = () => { }, onSuccess: () => { queryClient.invalidateQueries({ - queryKey: workspaceKeys.getAllUserWorkspace(ProjectType.SecretManager) + queryKey: workspaceKeys.getAllUserWorkspace() }); } }); diff --git a/frontend/src/hooks/api/workspace/query-keys.tsx b/frontend/src/hooks/api/workspace/query-keys.tsx index 1005fe8bc..44fee901c 100644 --- a/frontend/src/hooks/api/workspace/query-keys.tsx +++ b/frontend/src/hooks/api/workspace/query-keys.tsx @@ -3,7 +3,7 @@ import { TListProjectIdentitiesDTO } from "@app/hooks/api/workspace/types"; import type { CaStatus } from "../ca"; export const workspaceKeys = { - getWorkspaceById: (workspaceId: string) => [{ workspaceId }, "workspace"] as const, + getWorkspaceById: (workspaceId: string) => ["workspaces", { workspaceId }] as const, getWorkspaceSecrets: (workspaceId: string) => [{ workspaceId }, "workspace-secrets"] as const, getWorkspaceIndexStatus: (workspaceId: string) => [{ workspaceId }, "workspace-index-status"] as const, @@ -12,7 +12,7 @@ export const workspaceKeys = { getWorkspaceAuthorization: (workspaceId: string) => [{ workspaceId }, "workspace-authorizations"], getWorkspaceIntegrations: (workspaceId: string) => [{ workspaceId }, "workspace-integrations"], getAllUserWorkspace: (type?: string) => - type ? ["workspaces", { type }] : (["workspace"] as const), + type ? ["workspaces", { type }] : (["workspaces"] as const), getWorkspaceAuditLogs: (workspaceId: string) => [{ workspaceId }, "workspace-audit-logs"] as const, getWorkspaceUsers: (workspaceId: string) => [{ workspaceId }, "workspace-users"] as const, diff --git a/frontend/src/pages/auth/CliRedirectPage/CliRedirectPage.tsx b/frontend/src/pages/auth/CliRedirectPage/CliRedirectPage.tsx index 476127a67..aeede67f1 100644 --- a/frontend/src/pages/auth/CliRedirectPage/CliRedirectPage.tsx +++ b/frontend/src/pages/auth/CliRedirectPage/CliRedirectPage.tsx @@ -42,7 +42,14 @@ export const CliRedirectPage = () => {
Confirm your email
-