fixes
This commit is contained in:
1 parent
6586722652
commit
1e7c7bbfbb
65 files changed
+1345
-640
No files matched your search
@@ -403,7 +403,14 @@ func (s *Server) handleSyncAndProcessSample(w http.ResponseWriter, r *http.Reque
|
||||
return
|
||||
}
|
||||
|
||||
procJobs, err := s.Processing.StartJob(r.Context(), cid, uid, rawIDs, processingType)
|
||||
// Public API feed sample processing is API-origin too. The session-based
|
||||
// feed preview keeps the review workflow used by the dashboard.
|
||||
var procJobs []processing.Job
|
||||
if strings.HasPrefix(r.URL.Path, "/api/v1/") {
|
||||
procJobs, err = s.Processing.StartAPIJob(r.Context(), cid, uid, rawIDs, processingType)
|
||||
} else {
|
||||
procJobs, err = s.Processing.StartJob(r.Context(), cid, uid, rawIDs, processingType)
|
||||
}
|
||||
if err != nil {
|
||||
ClientOrLog(w, http.StatusBadRequest, "could not start processing", err, processing.ClientError)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user