|
@@ -101,6 +101,10 @@ async def push_message(
|
|
|
async def get_all_variables() -> AllVariablesModel:
|
|
|
return settings.variables
|
|
|
|
|
|
+@app.get("/variable/{key}")
|
|
|
+async def get_variable(key: str) -> VariableModel:
|
|
|
+ return Response(str(settings.variables[key]), media_type='text/plain')
|
|
|
+
|
|
|
|
|
|
def first_matching(lst: list, condition: Callable[[Any], bool]) -> int:
|
|
|
"""return the index of the first item that matches condition"""
|