Spaces:
Paused
Paused
Download console/src/api/modules/heartbeat.ts from mysticaldragon/HF: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/api/modules/heartbeat.ts
- Command line
-
hf download hf://spaces/mysticaldragon/HF/console/src/api/modules/heartbeat.ts
-
curl -L -o heartbeat.ts https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/api/modules/heartbeat.ts
491 Bytes
| import { request } from "../request"; | |
| import type { HeartbeatConfig } from "../types/heartbeat"; | |
| export const heartbeatApi = { | |
| getHeartbeatConfig: () => request<HeartbeatConfig>("/config/heartbeat"), | |
| updateHeartbeatConfig: (body: HeartbeatConfig) => | |
| request<HeartbeatConfig>("/config/heartbeat", { | |
| method: "PUT", | |
| body: JSON.stringify(body), | |
| }), | |
| runHeartbeatNow: () => | |
| request<{ started: boolean }>("/config/heartbeat/run", { | |
| method: "POST", | |
| }), | |
| }; | |