mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-02 16:25:52 +00:00
Merge pull request #4233 from Infisical/fix-identity-role-invalidation
fix(frontend): correct org identity mutation table invalidation
This commit is contained in:
@@ -86,6 +86,7 @@ export const useCreateIdentity = () => {
|
|||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: subscriptionQueryKeys.getOrgSubsription(organizationId)
|
queryKey: subscriptionQueryKeys.getOrgSubsription(organizationId)
|
||||||
});
|
});
|
||||||
|
queryClient.invalidateQueries({ queryKey: identitiesKeys.searchIdentitiesRoot });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -110,6 +111,7 @@ export const useUpdateIdentity = () => {
|
|||||||
queryKey: organizationKeys.getOrgIdentityMemberships(organizationId)
|
queryKey: organizationKeys.getOrgIdentityMemberships(organizationId)
|
||||||
});
|
});
|
||||||
queryClient.invalidateQueries({ queryKey: identitiesKeys.getIdentityById(identityId) });
|
queryClient.invalidateQueries({ queryKey: identitiesKeys.getIdentityById(identityId) });
|
||||||
|
queryClient.invalidateQueries({ queryKey: identitiesKeys.searchIdentitiesRoot });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -130,6 +132,7 @@ export const useDeleteIdentity = () => {
|
|||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: subscriptionQueryKeys.getOrgSubsription(organizationId)
|
queryKey: subscriptionQueryKeys.getOrgSubsription(organizationId)
|
||||||
});
|
});
|
||||||
|
queryClient.invalidateQueries({ queryKey: identitiesKeys.searchIdentitiesRoot });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ import {
|
|||||||
|
|
||||||
export const identitiesKeys = {
|
export const identitiesKeys = {
|
||||||
getIdentityById: (identityId: string) => [{ identityId }, "identity"] as const,
|
getIdentityById: (identityId: string) => [{ identityId }, "identity"] as const,
|
||||||
searchIdentities: (dto: TSearchIdentitiesDTO) => ["identity", "search", dto] as const,
|
searchIdentitiesRoot: ["identity", "search"] as const,
|
||||||
|
searchIdentities: (dto: TSearchIdentitiesDTO) =>
|
||||||
|
[...identitiesKeys.searchIdentitiesRoot, dto] as const,
|
||||||
getIdentityUniversalAuth: (identityId: string) =>
|
getIdentityUniversalAuth: (identityId: string) =>
|
||||||
[{ identityId }, "identity-universal-auth"] as const,
|
[{ identityId }, "identity-universal-auth"] as const,
|
||||||
getIdentityUniversalAuthClientSecrets: (identityId: string) =>
|
getIdentityUniversalAuthClientSecrets: (identityId: string) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user