mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Update vault.ts
This commit is contained in:
@@ -17,25 +17,16 @@ type VaultData = {
|
||||
const vaultFactory = () => {
|
||||
const getMounts = async (request: AxiosInstance) => {
|
||||
const response = await request
|
||||
.get<
|
||||
Record<
|
||||
string,
|
||||
{
|
||||
accessor: string;
|
||||
options: {
|
||||
version?: string;
|
||||
} | null;
|
||||
type: string;
|
||||
}
|
||||
>
|
||||
>("/v1/sys/mounts")
|
||||
.get<{
|
||||
data: Record<string, { accessor: string; options: { version?: string } | null; type: string }>;
|
||||
}>("/v1/sys/mounts")
|
||||
.catch((err) => {
|
||||
if (axios.isAxiosError(err)) {
|
||||
logger.error(err.response?.data, "External migration: Failed to get Vault mounts");
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
return response.data;
|
||||
return response.data.data;
|
||||
};
|
||||
|
||||
const getPaths = async (
|
||||
|
||||
Reference in New Issue
Block a user