Update vault.ts

This commit is contained in:
Daniel Hougaard
2025-07-31 20:54:21 +04:00
parent 7357d377e1
commit 7f72037d77
@@ -17,25 +17,16 @@ type VaultData = {
const vaultFactory = () => { const vaultFactory = () => {
const getMounts = async (request: AxiosInstance) => { const getMounts = async (request: AxiosInstance) => {
const response = await request const response = await request
.get< .get<{
Record< data: Record<string, { accessor: string; options: { version?: string } | null; type: string }>;
string, }>("/v1/sys/mounts")
{
accessor: string;
options: {
version?: string;
} | null;
type: string;
}
>
>("/v1/sys/mounts")
.catch((err) => { .catch((err) => {
if (axios.isAxiosError(err)) { if (axios.isAxiosError(err)) {
logger.error(err.response?.data, "External migration: Failed to get Vault mounts"); logger.error(err.response?.data, "External migration: Failed to get Vault mounts");
} }
throw err; throw err;
}); });
return response.data; return response.data.data;
}; };
const getPaths = async ( const getPaths = async (