requested changes

This commit is contained in:
Daniel Hougaard
2025-07-22 02:15:21 +04:00
parent 185cc4efba
commit bfd8b64871
4 changed files with 11 additions and 13 deletions
@@ -45,16 +45,19 @@ export const useImportVault = () => {
mutationFn: async ({
vaultAccessToken,
vaultNamespace,
vaultUrl
vaultUrl,
mappingType
}: {
vaultAccessToken: string;
vaultNamespace: string;
vaultUrl: string;
mappingType: string;
}) => {
await apiRequest.post("/api/v3/external-migration/vault/", {
vaultAccessToken,
vaultNamespace,
vaultUrl
vaultUrl,
mappingType
});
}
});
@@ -6,7 +6,7 @@ import { AnimatePresence, motion } from "framer-motion";
import { Modal, ModalContent } from "@app/components/v2";
import { EnvKeyPlatformModal } from "./EnvKeyPlatformModal";
import { VaultPlatformModal } from "./VaultPlatformModal copy";
import { VaultPlatformModal } from "./VaultPlatformModal";
type Props = {
isOpen?: boolean;
@@ -69,8 +69,6 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
});
type TFormData = z.infer<typeof formSchema>;
const fileUploadRef = useRef<HTMLInputElement>(null);
const { mutateAsync: importVault } = useImportVault();
const {
@@ -87,7 +85,8 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
await importVault({
vaultAccessToken: data.vaultAccessToken,
vaultNamespace: data.vaultNamespace,
vaultUrl: data.vaultUrl
vaultUrl: data.vaultUrl,
mappingType: data.mappingType
});
createNotification({
title: "Import started",
@@ -97,10 +96,6 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
onClose();
reset();
if (fileUploadRef.current) {
fileUploadRef.current.value = "";
}
} catch {
reset();
}