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