mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 00:28:12 +00:00
Update vault.ts
This commit is contained in:
@@ -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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user