mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 02:51:53 +08:00
api refactoring
This commit is contained in:
@@ -443,6 +443,10 @@ class Server: # pylint: disable=too-many-instance-attributes
|
||||
|
||||
# ===== HID
|
||||
|
||||
@_exposed("GET", "/hid")
|
||||
async def __hid_state_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response:
|
||||
return _json(self.__hid.get_state())
|
||||
|
||||
@_exposed("POST", "/hid/reset")
|
||||
async def __hid_reset_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response:
|
||||
await self.__hid.reset()
|
||||
|
||||
Reference in New Issue
Block a user