feat: Breakdown 所有执行操作统一返回任务 ID
This commit is contained in:
1 parent
33ebea2722
commit
2c5a42fa78
1 file changed
+4
-10
@@ -11,14 +11,8 @@ export const breakdownApi = {
|
||||
latest: (id: string, signal?: AbortSignal) =>
|
||||
optionalResource(request<BreakdownState>(`/projects/${encodeURIComponent(id)}/breakdown/latest`, { signal })),
|
||||
run: (id: string, action: BreakdownAction, input?: BreakdownInput) =>
|
||||
action === 'start'
|
||||
? request<WorkflowExecutionStart>(`/projects/${encodeURIComponent(id)}/breakdown/start`, {
|
||||
method: 'POST',
|
||||
body: input
|
||||
})
|
||||
: request<BreakdownState>(`/projects/${encodeURIComponent(id)}/breakdown/${action}`, {
|
||||
method: 'POST',
|
||||
body: input,
|
||||
timeoutMs: 0
|
||||
})
|
||||
request<WorkflowExecutionStart>(`/projects/${encodeURIComponent(id)}/breakdown/${action}`, {
|
||||
method: 'POST',
|
||||
body: input
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user