diff --git a/web/src/api.ts b/web/src/api.ts index 93e3e94..36a0073 100644 --- a/web/src/api.ts +++ b/web/src/api.ts @@ -138,7 +138,8 @@ export const createAccount = ( export const testAccounts = (id: number) => api(`/api/tasks/${id}/test`, { method: 'POST' }) -export const runTask = (id: number) => api(`/api/tasks/${id}/run`, { method: 'POST' }) +export const runTask = (id: number, accountIds?: number[]) => + api(`/api/tasks/${id}/run`, accountIds?.length ? jsonBody({ account_ids: accountIds }) : { method: 'POST' }) export interface Run { id: number