Fixes
This commit is contained in:
1 parent
04794aea54
commit
cfd31f398c
61 files changed
+2062
-254
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user