mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 04:49:31 +08:00
14 lines
450 B
TypeScript
14 lines
450 B
TypeScript
import { requestJson } from "@/shared/api/client";
|
|
import { parseRuntimeStatus, type RuntimeStatusModel } from "./model";
|
|
|
|
export const RUNTIME_STATUS_PATH = "/api/v1/system/runtime";
|
|
|
|
export async function fetchRuntimeStatus(signal?: AbortSignal): Promise<RuntimeStatusModel> {
|
|
const payload = await requestJson<unknown>(RUNTIME_STATUS_PATH, {
|
|
cache: "no-store",
|
|
signal,
|
|
scope: "runtime",
|
|
});
|
|
return parseRuntimeStatus(payload);
|
|
}
|