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

@@ -3,6 +3,7 @@ package httpapi
import (
"errors"
"net/http"
"strings"
"github.com/descrybe/descrybe-v2/apps/api/internal/billing"
"github.com/descrybe/descrybe-v2/apps/api/internal/processing"
@@ -40,7 +41,15 @@ func (s *Server) handleStartProcessingJob(w http.ResponseWriter, r *http.Request
}
ids = append(ids, id)
}
jobs, err := s.Processing.StartJob(r.Context(), cid, uid, ids, body.ProcessingType)
// The shared handler serves session dashboard jobs and /api/v1/process.
// Public API results should be directly visible in the Processed catalog tab.
var jobs []processing.Job
var err error
if strings.HasPrefix(r.URL.Path, "/api/v1/") {
jobs, err = s.Processing.StartAPIJob(r.Context(), cid, uid, ids, body.ProcessingType)
} else {
jobs, err = s.Processing.StartJob(r.Context(), cid, uid, ids, body.ProcessingType)
}
if err != nil {
if writePlanGate(w, err) {
return