Download apps/web-naive/src/api/core/system.ts from binhugg3/admin: direct link, hf CLI and curl.
- Browser
- Download file 865 Bytes
-
https://huggingface.co/spaces/binhugg3/admin/resolve/main/apps/web-naive/src/api/core/system.ts
- Command line
-
hf download hf://spaces/binhugg3/admin/apps/web-naive/src/api/core/system.ts
-
curl -L -o system.ts https://huggingface.co/spaces/binhugg3/admin/resolve/main/apps/web-naive/src/api/core/system.ts
865 Bytes
| import { requestClient } from '#/api/request'; | |
| // ======================== 类型定义 ======================== | |
| export interface SystemConfig { | |
| sync_cron_hour: number; | |
| sync_max_concurrent: number; | |
| access_token_expire_minutes: number; | |
| } | |
| export interface SystemConfigUpdateParams { | |
| /** 每日自动同步时间(0~23 小时) */ | |
| sync_cron_hour?: number; | |
| /** access token 有效期(分钟,1~43200) */ | |
| access_token_expire_minutes?: number; | |
| } | |
| // ======================== API ======================== | |
| /** 获取系统配置 GET /admin/system/config */ | |
| export function getSystemConfigApi() { | |
| return requestClient.get<SystemConfig>('/admin/system/config'); | |
| } | |
| /** 更新系统配置 PUT /admin/system/config */ | |
| export function updateSystemConfigApi(data: SystemConfigUpdateParams) { | |
| return requestClient.put('/admin/system/config', data); | |
| } | |