This commit is contained in:
greeneclipse committed 2026-10-15 21:22:43 +02:00
1 parent 04794aea54
commit cfd31f398c
61 files changed
+2062 -254

No files matched your search

+16
View File
@@ -402,7 +402,23 @@ func (s *Service) runSync(ctx context.Context, companyID, feedID, jobID uuid.UUI
var parseCount int
switch format {
case "xml":
if itemPath == "item" {
itemPath = ""
}
parseCount, err = parseXMLItems(body, itemPath, onRow)
case "json":
jsonPath := itemPath
if jsonPath == "item" {
jsonPath = ""
}
if v := itemPathFromMappings(mappingsRaw); v != "" {
jsonPath = v
} else if opts, ok := feed["options"].(map[string]any); ok {
if v, ok := opts["item_path"].(string); ok {
jsonPath = v
}
}
parseCount, err = parseJSONItems(body, jsonPath, onRow)
default:
parseCount, err = parseCSV(body, onRow)
}