diff options
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/api/msd.py | 11 |
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") |