Pulse/frontend-modern/src/api/system.ts
2025-10-11 23:29:47 +00:00

25 lines
738 B
TypeScript

// System API for managing system settings
import { apiFetchJSON } from '@/utils/apiClient';
export interface SystemSettings {
// Note: PVE polling is hardcoded to 10s server-side
updateChannel?: string;
autoUpdateEnabled: boolean;
autoUpdateCheckInterval?: number;
autoUpdateTime?: string;
// apiToken removed - now handled via security API
}
export class SystemAPI {
// System Settings
static async getSystemSettings(): Promise<SystemSettings> {
return apiFetchJSON('/api/system/settings');
}
static async updateSystemSettings(settings: Partial<SystemSettings>): Promise<void> {
await apiFetchJSON('/api/system/settings/update', {
method: 'POST',
body: JSON.stringify(settings),
});
}
}