Merge branch 'main' into feat/create-multiple-orgs-under-same-account

This commit is contained in:
vmatsiiako
2023-10-16 18:55:48 -07:00
committed by GitHub
29 changed files with 484 additions and 104 deletions
+10 -2
View File
@@ -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}`, {
+1
View File
@@ -120,6 +120,7 @@ export type TDeleteSecretsV3DTO = {
type: "shared" | "personal";
secretPath: string;
secretName: string;
secretId?: string;
};
export type TCreateSecretBatchDTO = {
+11
View File
@@ -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();
}
});