diff --git a/src/server/ndjsonWorker.js b/src/server/ndjsonWorker.js index bfa70c6..5594262 100644 --- a/src/server/ndjsonWorker.js +++ b/src/server/ndjsonWorker.js @@ -53,10 +53,12 @@ ndjsonWorker.process(async job => { return; } - const insertions = ndjsonResources - .trim() - .split(/\n/) - .map(async resourceStr => { + const ndjsonLines = ndjsonResources.trim().split(/\n/); + if(ndjsonLines.length > 0 && JSON.parse(ndjsonLines[0]).resourceType === 'Parameters'){ + // check first line for a Parameters header and remove if necessary + ndjsonLines.shift(); + } + const insertions = ndjsonLines.map(async resourceStr => { let data; try { data = JSON.parse(resourceStr);