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

15 lines
369 B
TypeScript
Raw Normal View History

2021-05-09 11:18:18 +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"));
2021-05-10 11:35:14 +01:00
const resp = await fetch(request)
const data = await resp.json() as SealStatusType;
return data;
2021-05-07 11:53:26 +01:00
}