mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-17 02:11:44 +08:00
common component interface
This commit is contained in:
@@ -41,7 +41,7 @@ class AtxApi:
|
||||
|
||||
@exposed_http("GET", "/atx")
|
||||
async def __state_handler(self, _: Request) -> Response:
|
||||
return make_json_response(self.__atx.get_state())
|
||||
return make_json_response(await self.__atx.get_state())
|
||||
|
||||
@exposed_http("POST", "/atx/power")
|
||||
async def __power_handler(self, request: Request) -> Response:
|
||||
|
||||
@@ -38,7 +38,7 @@ class WolApi:
|
||||
|
||||
@exposed_http("GET", "/wol")
|
||||
async def __state_handler(self, _: Request) -> Response:
|
||||
return make_json_response(self.__wol.get_state())
|
||||
return make_json_response(await self.__wol.get_state())
|
||||
|
||||
@exposed_http("POST", "/wol/wakeup")
|
||||
async def __wakeup_handler(self, _: Request) -> Response:
|
||||
|
||||
Reference in New Issue
Block a user