mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 20:26:05 +00:00
fix: caching
This commit is contained in:
@@ -30,7 +30,8 @@ export const projectKeys = {
|
|||||||
// allows invalidation using above key without knowing params
|
// allows invalidation using above key without knowing params
|
||||||
getProjectIdentityMembershipsWithParams: ({ projectId, ...params }: TListProjectIdentitiesDTO) =>
|
getProjectIdentityMembershipsWithParams: ({ projectId, ...params }: TListProjectIdentitiesDTO) =>
|
||||||
[...projectKeys.getProjectIdentityMemberships(projectId), params] as const,
|
[...projectKeys.getProjectIdentityMemberships(projectId), params] as const,
|
||||||
searchProject: (dto: TSearchProjectsDTO) => ["search-projects", dto] as const,
|
searchProject: (dto: TSearchProjectsDTO) =>
|
||||||
|
[...projectKeys.allProjectQueries(), "search-projects", dto] as const,
|
||||||
getProjectGroupMemberships: (projectId: string) => [{ projectId }, "project-groups"] as const,
|
getProjectGroupMemberships: (projectId: string) => [{ projectId }, "project-groups"] as const,
|
||||||
getProjectGroupMembershipDetails: (projectId: string, groupId: string) =>
|
getProjectGroupMembershipDetails: (projectId: string, groupId: string) =>
|
||||||
[{ projectId, groupId }, "project-group-membership-details"] as const,
|
[{ projectId, groupId }, "project-group-membership-details"] as const,
|
||||||
|
|||||||
+2
-2
@@ -70,11 +70,11 @@ export const NewSubOrganizationForm = ({ onClose }: ContentProps) => {
|
|||||||
SecurityClient.setToken(token);
|
SecurityClient.setToken(token);
|
||||||
SecurityClient.setProviderAuthToken("");
|
SecurityClient.setProviderAuthToken("");
|
||||||
queryClient.removeQueries({ queryKey: authKeys.getAuthToken });
|
queryClient.removeQueries({ queryKey: authKeys.getAuthToken });
|
||||||
queryClient.removeQueries({ queryKey: projectKeys.getAllUserProjects() });
|
queryClient.removeQueries({ queryKey: subOrgQuery.queryKey });
|
||||||
|
|
||||||
await router.invalidate({ sync: true }).catch(() => null);
|
await router.invalidate({ sync: true }).catch(() => null);
|
||||||
queryClient.removeQueries({ queryKey: subOrgQuery.queryKey });
|
|
||||||
await navigateUserToOrg({ navigate, organizationId: organization.id });
|
await navigateUserToOrg({ navigate, organizationId: organization.id });
|
||||||
|
queryClient.removeQueries({ queryKey: projectKeys.allProjectQueries() });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user