From 0636b68fb0e173d97baaf9ffad96b28c871ea1f9 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Wed, 18 May 2022 00:00:01 +0200 Subject: [PATCH] fix bugs introduce today --- bumper/web/plugins/api/appsvr.py | 2 +- bumper/web/plugins/api/users.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bumper/web/plugins/api/appsvr.py b/bumper/web/plugins/api/appsvr.py index 3c15ed1..2e0ddad 100644 --- a/bumper/web/plugins/api/appsvr.py +++ b/bumper/web/plugins/api/appsvr.py @@ -83,7 +83,7 @@ async def _handle_appsvr_app(request: Request) -> Response: def _include_product_iot_map_info(bot: dict[str, Any]) -> dict[str, Any]: result = copy.deepcopy(bot) - for botprod in get_product_iot_map(): + for botprod in get_product_iot_map()[0]: if botprod["classid"] == result["class"]: result["UILogicId"] = botprod["product"]["UILogicId"] result["ota"] = botprod["product"]["ota"] diff --git a/bumper/web/plugins/api/users.py b/bumper/web/plugins/api/users.py index 09ba132..c492407 100644 --- a/bumper/web/plugins/api/users.py +++ b/bumper/web/plugins/api/users.py @@ -81,7 +81,7 @@ async def _handle_usersapi(request: Request) -> Response: } else: # EcoVacs Home LoginByITToken login_token = loginByItToken(postbody["token"]) - if not login_token: + if login_token: body = { "resource": postbody["resource"], "result": "ok",