summaryrefslogtreecommitdiff
path: root/kvmd/apps
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-12-21 01:59:49 +0300
committerDevaev Maxim <[email protected]>2020-12-21 01:59:49 +0300
commit42475809fcafef12d39a12b7dd2be49aea9d9b6f (patch)
treea56572c31a6128434d2c8b89e7d479a558965b47 /kvmd/apps
parent2cb210c975b37d4e9db06b8e121f42f7d09c6fe1 (diff)
refactoring
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/kvmd/api/msd.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/kvmd/apps/kvmd/api/msd.py b/kvmd/apps/kvmd/api/msd.py
index 04fdd8b2..08ce36ff 100644
--- a/kvmd/apps/kvmd/api/msd.py
+++ b/kvmd/apps/kvmd/api/msd.py
@@ -60,14 +60,9 @@ class MsdApi:
await self.__msd.set_params(**params) # type: ignore
return make_json_response()
- @exposed_http("POST", "/msd/connect")
- async def __connect_handler(self, _: Request) -> Response:
- await self.__msd.connect()
- return make_json_response()
-
- @exposed_http("POST", "/msd/disconnect")
- async def __disconnect_handler(self, _: Request) -> Response:
- await self.__msd.disconnect()
+ @exposed_http("POST", "/msd/set_connected")
+ async def __set_connected_handler(self, request: Request) -> Response:
+ await self.__msd.set_connected(valid_bool(request.query.get("connected")))
return make_json_response()
@exposed_http("POST", "/msd/write")