From 5e9e526fc24597b41fd69071d7cc2402c32526de Mon Sep 17 00:00:00 2001 From: Blallo Date: Thu, 8 Aug 2019 17:15:51 +0200 Subject: [PATCH] Remove redundant handlers. --- api/rest.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api/rest.py b/api/rest.py index 93226ba..d1fef98 100644 --- a/api/rest.py +++ b/api/rest.py @@ -65,6 +65,7 @@ async def favicon_handle(request: web.Request) -> web.Response: @routes.get("/api/login") @routes.get("/api/badge") +@routes.get("/api/status") async def routing_handler(request: web.Request) -> web.Response: alog.debug("(%s) %s", request.method, request.path) session = await get_session(request) @@ -159,11 +160,3 @@ async def movements_handle(request: web.Request) -> web.Response: resp_data = {"movements": movements} resp_data["logged_in"] = True # type: ignore return web.json_response(resp_data, status=200) - - -@routes.get("/api/status") -async def status_handle(request: web.Request) -> web.Response: - alog.debug("status") - session = await get_session(request) - _logged_in = session.get("async_operator") in OPERATORS - return web.json_response({"logged_in": _logged_in}, status=200)