mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 09:48:39 +00:00
Revert "Fork Sync: Update from parent repository"
This commit is contained in:
@@ -97,7 +97,6 @@ func updateVideoSingleTask(ctx context.Context, adaptor channel.TaskAdaptor, cha
|
|||||||
taskResult.Url = t.FailReason
|
taskResult.Url = t.FailReason
|
||||||
taskResult.Progress = t.Progress
|
taskResult.Progress = t.Progress
|
||||||
taskResult.Reason = t.FailReason
|
taskResult.Reason = t.FailReason
|
||||||
task.Data = t.Data
|
|
||||||
} else if taskResult, err = adaptor.ParseTaskResult(responseBody); err != nil {
|
} else if taskResult, err = adaptor.ParseTaskResult(responseBody); err != nil {
|
||||||
return fmt.Errorf("parseTaskResult failed for task %s: %w", taskId, err)
|
return fmt.Errorf("parseTaskResult failed for task %s: %w", taskId, err)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -362,20 +362,11 @@ func videoFetchByIDRespBodyBuilder(c *gin.Context) (respBody []byte, taskResp *d
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if len(respBody) != 0 {
|
if len(respBody) == 0 {
|
||||||
return
|
respBody, err = json.Marshal(dto.TaskResponse[any]{
|
||||||
}
|
Code: "success",
|
||||||
|
Data: TaskModel2Dto(originTask),
|
||||||
if strings.HasPrefix(c.Request.RequestURI, "/v1/videos/") {
|
})
|
||||||
respBody = originTask.Data
|
|
||||||
return
|
|
||||||
}
|
|
||||||
respBody, err = json.Marshal(dto.TaskResponse[any]{
|
|
||||||
Code: "success",
|
|
||||||
Data: TaskModel2Dto(originTask),
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
taskResp = service.TaskErrorWrapper(err, "marshal_response_failed", http.StatusInternalServerError)
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user