diff --git a/webserver.py b/webserver.py index 505c4e4..fe55262 100755 --- a/webserver.py +++ b/webserver.py @@ -101,13 +101,14 @@ async def push_message( async def get_all_variables() -> AllVariablesModel: return settings.variables + @app.get("/variables/{key}") async def get_variable(key: str) -> VariableModel: try: value = settings.variables[key] except KeyError: raise HTTPException(status_code=404, detail="Variable not found") - return Response(str(value), media_type='text/plain') + return Response(str(value), media_type="text/plain") def first_matching(lst: list, condition: Callable[[Any], bool]) -> int: