feat: SAFE_MODE

This commit is contained in:
Timothy J. Baek
2024-06-23 19:28:33 -07:00
parent ab700a16be
commit 2eb15ea1fc
3 changed files with 25 additions and 1 deletions

View File

@@ -221,6 +221,19 @@ class FunctionsTable:
except:
return None
def deactivate_all_functions(self) -> Optional[bool]:
try:
query = Function.update(
**{"is_active": False},
updated_at=int(time.time()),
)
query.execute()
return True
except:
return None
def delete_function_by_id(self, id: str) -> bool:
try:
query = Function.delete().where((Function.id == id))