Update vault.ts

This commit is contained in:
Daniel Hougaard
2025-07-31 20:54:21 +04:00
parent 7357d377e1
commit 7f72037d77

View File

@@ -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 (