1
0
Fork 0
VaultUI/src/api/getSealStatus.ts

17 lines
379 B
TypeScript
Raw Normal View History

2021-05-08 00:21:58 +01:00
import { appendAPIURL } from "./apiUtils";
2021-05-07 11:53:26 +01:00
2021-05-08 02:09:08 +01:00
export type SealStatusType = {
2021-05-08 00:21:58 +01:00
progress: number;
t: number;
sealed: boolean;
}
2021-05-07 11:53:26 +01:00
2021-05-08 00:21:58 +01:00
export async function getSealStatus(): Promise<SealStatusType> {
2021-05-07 11:53:26 +01:00
const request = new Request(appendAPIURL("/v1/sys/seal-status"));
return fetch(request).then(response => {
return response.json();
}).then(data => {
return data;
});
}