legge variabile singola
This commit is contained in:
parent
b40c8c3a10
commit
10d20d625e
1 changed files with 4 additions and 0 deletions
|
@ -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"""
|
||||
|
|
Loading…
Reference in a new issue