1
0
Fork 0
VaultUI/src/api/sys/getMounts.ts
2021-05-09 11:18:18 +01:00

22 lines
466 B
TypeScript

import { appendAPIURL, getHeaders } from "../apiUtils";
type MountsType = {
[key: string]: {
type: string
options: {
version: string
}
}
}
export async function getMounts(): Promise<MountsType> {
const request = new Request(appendAPIURL("/v1/sys/internal/ui/mounts"), {
headers: (getHeaders() as any),
});
return fetch(request).then(response => {
return response.json();
}).then(data => {
return data.data.secret;
});
}