mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-07-29 18:21:45 +08:00
refactor: 修改为同步请求
This commit is contained in:
@@ -613,17 +613,7 @@ function sortSerialDevices(serialDevices: SerialDeviceOption[]): SerialDeviceOpt
|
||||
})
|
||||
}
|
||||
|
||||
/** @deprecated 使用域特定 API(videoConfigApi, hidConfigApi 等)替代 */
|
||||
export const configApi = {
|
||||
get: () => request<Record<string, unknown>>('/config'),
|
||||
|
||||
/** @deprecated 使用域特定 API 的 update 方法替代 */
|
||||
update: (updates: Record<string, unknown>) =>
|
||||
request<{ success: boolean }>('/config', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(updates),
|
||||
}),
|
||||
|
||||
listDevices: async () => {
|
||||
const result = await request<{
|
||||
video: Array<{
|
||||
|
||||
Reference in New Issue
Block a user