This commit is contained in:
Dave Horton
2020-02-28 10:25:43 -05:00
parent 19d674f531
commit 8cf107c34c
7 changed files with 9 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
function normalizeJambones(logger, obj) {
logger.debug(`normalizeJambones: ${JSON.stringify(obj)}`);
if (!Array.isArray(obj)) throw new Error('malformed jambonz payload: must be array');
const document = [];
for (const tdata of obj) {
@@ -17,7 +16,6 @@ function normalizeJambones(logger, obj) {
}
else if (Object.keys(tdata).length === 1) {
// {'say': {..}}
logger.debug(`pushing ${JSON.stringify(tdata)}`);
document.push(tdata);
}
else {