mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 22:46:24 +00:00
Finish identity page project provisioning/deprovisioning
This commit is contained in:
@@ -6,6 +6,7 @@ import { CaStatus } from "../ca/enums";
|
||||
import { TCertificateAuthority } from "../ca/types";
|
||||
import { TCertificate } from "../certificates/types";
|
||||
import { TGroupMembership } from "../groups/types";
|
||||
import { identitiesKeys } from "../identities/queries";
|
||||
import { IdentityMembership } from "../identities/types";
|
||||
import { IntegrationAuth } from "../integrationAuth/types";
|
||||
import { TIntegration } from "../integrations/types";
|
||||
@@ -152,7 +153,7 @@ export const useGetWorkspaceById = (workspaceId: string) => {
|
||||
return useQuery({
|
||||
queryKey: workspaceKeys.getWorkspaceById(workspaceId),
|
||||
queryFn: () => fetchWorkspaceById(workspaceId),
|
||||
enabled: true
|
||||
enabled: Boolean(workspaceId)
|
||||
});
|
||||
};
|
||||
|
||||
@@ -441,8 +442,9 @@ export const useAddIdentityToWorkspace = () => {
|
||||
|
||||
return identityMembership;
|
||||
},
|
||||
onSuccess: (_, { workspaceId }) => {
|
||||
onSuccess: (_, { identityId, workspaceId }) => {
|
||||
queryClient.invalidateQueries(workspaceKeys.getWorkspaceIdentityMemberships(workspaceId));
|
||||
queryClient.invalidateQueries(identitiesKeys.getIdentityProjectMemberships(identityId));
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -462,8 +464,9 @@ export const useUpdateIdentityWorkspaceRole = () => {
|
||||
|
||||
return identityMembership;
|
||||
},
|
||||
onSuccess: (_, { workspaceId }) => {
|
||||
onSuccess: (_, { identityId, workspaceId }) => {
|
||||
queryClient.invalidateQueries(workspaceKeys.getWorkspaceIdentityMemberships(workspaceId));
|
||||
queryClient.invalidateQueries(identitiesKeys.getIdentityProjectMemberships(identityId));
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -485,8 +488,9 @@ export const useDeleteIdentityFromWorkspace = () => {
|
||||
);
|
||||
return identityMembership;
|
||||
},
|
||||
onSuccess: (_, { workspaceId }) => {
|
||||
onSuccess: (_, { identityId, workspaceId }) => {
|
||||
queryClient.invalidateQueries(workspaceKeys.getWorkspaceIdentityMemberships(workspaceId));
|
||||
queryClient.invalidateQueries(identitiesKeys.getIdentityProjectMemberships(identityId));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user