* Fetch all workflows
()
| 20 | * Fetch all workflows |
| 21 | */ |
| 22 | async function getWorkflows() { |
| 23 | const res = await fetch(`${API_BASE}/workflows`, { headers: HEADERS }); |
| 24 | if (!res.ok) { |
| 25 | throw new Error(`Failed to fetch workflows: ${res.status}`); |
| 26 | } |
| 27 | return res.json(); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Fetch runs for a specific workflow |