Skip to content

Commit

Permalink
added an active paramater to getting workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmin3 committed Mar 6, 2024
1 parent 7192f21 commit 7793fc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ai_ta_backend/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ def get_workflows(self, limit, pagination: bool = True, api_key: str = "", activ
headers = {"X-N8N-API-KEY": api_key, "Accept": "application/json"}
url = self.url + f"/api/v1/workflows?limit={limit}"
if active:
url = url + f"&active=true"
url = url + "&active=true"
response = requests.get(url, headers=headers, timeout=8)
workflows = response.json()
response.ok
if workflows.get('message') == 'unauthorized' and not response.ok:
raise Exception('Unauthorized')

Expand Down

0 comments on commit 7793fc4

Please sign in to comment.