mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-13 02:54:26 +08:00
feat: 支持 WatchDog
This commit is contained in:
@@ -34,6 +34,8 @@ import type {
|
||||
FrpcConfigUpdate,
|
||||
WebConfigResponse,
|
||||
WebConfigUpdate,
|
||||
WatchdogConfigResponse,
|
||||
WatchdogConfigUpdate,
|
||||
} from '@/types/generated'
|
||||
|
||||
import { request } from './request'
|
||||
@@ -42,6 +44,16 @@ export const configApi = {
|
||||
getAll: () => request<AppConfig>('/config'),
|
||||
}
|
||||
|
||||
export const watchdogConfigApi = {
|
||||
get: () => request<WatchdogConfigResponse>('/config/watchdog', {}, { toastOnError: false }),
|
||||
|
||||
update: (config: WatchdogConfigUpdate) =>
|
||||
request<WatchdogConfigResponse>('/config/watchdog', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(config),
|
||||
}, { toastOnError: false }),
|
||||
}
|
||||
|
||||
export const authConfigApi = {
|
||||
get: () => request<AuthConfig>('/config/auth'),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user