This commit is contained in:
greeneclipse committed 2026-10-16 00:34:06 +02:00
1 parent 6586722652
commit 1e7c7bbfbb
65 files changed
+1345 -640

No files matched your search

+8 -1
View File
@@ -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