This commit is contained in:
Timothy Jaeryang Baek
2026-04-01 04:33:30 -05:00
parent bae5ff938a
commit 53583f8d83
3 changed files with 0 additions and 75 deletions
-21
View File
@@ -152,18 +152,6 @@ class AutomationTable:
row = db.get(Automation, id)
return AutomationModel.model_validate(row) if row else None
def get_by_user(
self, user_id: str, db: Optional[Session] = None
) -> list[AutomationModel]:
with get_db_context(db) as db:
rows = (
db.query(Automation)
.filter_by(user_id=user_id)
.order_by(Automation.created_at.desc())
.all()
)
return [AutomationModel.model_validate(r) for r in rows]
def search_automations(
self,
user_id: str,
@@ -206,15 +194,6 @@ class AutomationTable:
total=total,
)
def get_all(self, db: Optional[Session] = None) -> list[AutomationModel]:
with get_db_context(db) as db:
rows = (
db.query(Automation)
.order_by(Automation.created_at.desc())
.all()
)
return [AutomationModel.model_validate(r) for r in rows]
def update_by_id(
self,
id: str,