mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-03 19:41:52 +08:00
refactoring
This commit is contained in:
@@ -37,10 +37,10 @@ class WolApi:
|
|||||||
# =====
|
# =====
|
||||||
|
|
||||||
@exposed_http("GET", "/wol")
|
@exposed_http("GET", "/wol")
|
||||||
async def __wol_state_handler(self, _: Request) -> Response:
|
async def __state_handler(self, _: Request) -> Response:
|
||||||
return make_json_response(self.__wol.get_state())
|
return make_json_response(self.__wol.get_state())
|
||||||
|
|
||||||
@exposed_http("POST", "/wol/wakeup")
|
@exposed_http("POST", "/wol/wakeup")
|
||||||
async def __wol_wakeup_handler(self, _: Request) -> Response:
|
async def __wakeup_handler(self, _: Request) -> Response:
|
||||||
await self.__wol.wakeup()
|
await self.__wol.wakeup()
|
||||||
return make_json_response()
|
return make_json_response()
|
||||||
|
|||||||
Reference in New Issue
Block a user