Skip to content

Commit e6ce236

Browse files
committed
Use the new workflows runs endpoint
1 parent 257557b commit e6ce236

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/apps/review/src/lib/hooks/useFetchAiWorkflowRuns.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,8 @@ export function useFetchAiWorkflowsRuns(
119119
error: fetchError,
120120
isValidating: isLoading,
121121
}: SWRResponse<AiWorkflowRun[], Error> = useSWR<AiWorkflowRun[], Error>(
122-
`${TC_API_BASE_URL}/workflows/${workflowIds.join(',')}/runs?submissionId=${submissionId}`,
122+
`${TC_API_BASE_URL}/workflows/runs?submissionId=${submissionId}`,
123123
{
124-
fetcher: () => Promise.all(
125-
workflowIds.map(workflowId => (
126-
xhrGetAsync<AiWorkflowRun>(
127-
`${TC_API_BASE_URL}/workflows/${workflowId}/runs?submissionId=${submissionId}`,
128-
)
129-
)),
130-
)
131-
.then(results => results.flat()),
132124
isPaused: () => !workflowIds?.length || !submissionId,
133125
},
134126
)

0 commit comments

Comments
 (0)