mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 05:19:49 +00:00
Merge branch 'main' into feat/create-multiple-orgs-under-same-account
This commit is contained in:
@@ -189,12 +189,20 @@ export const useDeleteSecretV3 = ({
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<{}, {}, TDeleteSecretsV3DTO>({
|
||||
mutationFn: async ({ secretPath = "/", type, environment, workspaceId, secretName }) => {
|
||||
mutationFn: async ({
|
||||
secretPath = "/",
|
||||
type,
|
||||
environment,
|
||||
workspaceId,
|
||||
secretName,
|
||||
secretId
|
||||
}) => {
|
||||
const reqBody = {
|
||||
workspaceId,
|
||||
environment,
|
||||
type,
|
||||
secretPath
|
||||
secretPath,
|
||||
secretId
|
||||
};
|
||||
|
||||
const { data } = await apiRequest.delete(`/api/v3/secrets/${secretName}`, {
|
||||
|
||||
@@ -120,6 +120,7 @@ export type TDeleteSecretsV3DTO = {
|
||||
type: "shared" | "personal";
|
||||
secretPath: string;
|
||||
secretName: string;
|
||||
secretId?: string;
|
||||
};
|
||||
|
||||
export type TCreateSecretBatchDTO = {
|
||||
|
||||
@@ -51,6 +51,17 @@ export const useDeleteUser = () => {
|
||||
return user;
|
||||
},
|
||||
onSuccess: () => {
|
||||
localStorage.removeItem("protectedKey");
|
||||
localStorage.removeItem("protectedKeyIV");
|
||||
localStorage.removeItem("protectedKeyTag");
|
||||
localStorage.removeItem("publicKey");
|
||||
localStorage.removeItem("encryptedPrivateKey");
|
||||
localStorage.removeItem("iv");
|
||||
localStorage.removeItem("tag");
|
||||
localStorage.removeItem("PRIVATE_KEY");
|
||||
localStorage.removeItem("orgData.id");
|
||||
localStorage.removeItem("projectData.id");
|
||||
|
||||
queryClient.clear();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user