admin / apps /web-naive /src /api /core /system.ts
hanbinsite's picture
chore: HuggingFace deploy 2026-05-19 10:37
dc649b1
Raw History Blame Contribute Delete
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);
}