mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-30 01:10:50 +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'),
|
||||
|
||||
|
||||
@@ -813,6 +813,7 @@ export {
|
||||
rtspConfigApi,
|
||||
vncConfigApi,
|
||||
webConfigApi,
|
||||
watchdogConfigApi,
|
||||
type RustDeskConfigResponse,
|
||||
type RustDeskStatusResponse,
|
||||
type RustDeskConfigUpdate,
|
||||
|
||||
Reference in New Issue
Block a user