feat: action function

This commit is contained in:
Timothy J. Baek
2024-07-11 18:41:00 -07:00
parent 90c3d68f00
commit eb10001eb7
7 changed files with 211 additions and 4 deletions

View File

@@ -167,6 +167,15 @@ class FunctionsTable:
.all()
]
def get_global_action_functions(self) -> List[FunctionModel]:
with get_db() as db:
return [
FunctionModel.model_validate(function)
for function in db.query(Function)
.filter_by(type="action", is_active=True, is_global=True)
.all()
]
def get_function_valves_by_id(self, id: str) -> Optional[dict]:
with get_db() as db: