mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 02:51:51 +00:00
feat(external-migrations): vault migrations
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from "./mutations";
|
||||
@@ -15,7 +15,7 @@ export const useImportEnvKey = () => {
|
||||
formData.append("file", file);
|
||||
|
||||
try {
|
||||
const response = await apiRequest.post("/api/v3/migrate/env-key/", formData, {
|
||||
const response = await apiRequest.post("/api/v3/external-migration/env-key/", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
},
|
||||
@@ -39,3 +39,23 @@ export const useImportEnvKey = () => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const useImportVault = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({
|
||||
vaultAccessToken,
|
||||
vaultNamespace,
|
||||
vaultUrl
|
||||
}: {
|
||||
vaultAccessToken: string;
|
||||
vaultNamespace: string;
|
||||
vaultUrl: string;
|
||||
}) => {
|
||||
await apiRequest.post("/api/v3/external-migration/vault/", {
|
||||
vaultAccessToken,
|
||||
vaultNamespace,
|
||||
vaultUrl
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user