2021-05-09 11:18:18 +01:00
|
|
|
import { appendAPIURL, getHeaders } from "../apiUtils";
|
2021-05-08 00:21:58 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
});
|
|
|
|
}
|