Remove redundant handlers.
This commit is contained in:
parent
e3155922af
commit
5e9e526fc2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user