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
-27
View File
@@ -71,22 +71,6 @@ def enrich_automation(
)
############################
# GetAutomations
############################
@router.get('/', response_model=list[AutomationResponse])
async def get_automations(
request: Request,
user=Depends(get_verified_user),
db: Session = Depends(get_session),
):
check_automations_permission(request, user)
automations = Automations.get_by_user(user.id, db=db)
return [enrich_automation(automation, db, tz=user.timezone) for automation in automations]
############################
# GetAutomationItems (paginated)
############################
@@ -299,15 +283,4 @@ async def get_automation_runs(
return AutomationRuns.get_by_automation(id, skip=skip, limit=limit, db=db)
############################
# Admin Endpoints
############################
@router.get('/admin/all', response_model=list[AutomationModel])
async def get_all_automations(
request: Request,
user=Depends(get_admin_user),
db: Session = Depends(get_session),
):
return Automations.get_all(db=db)