@oddnetworks/oddworks
Advanced tools
Comparing version 4.6.0 to 4.6.1
@@ -68,3 +68,3 @@ 'use strict'; | ||
const query = payload.query; | ||
const typeFilter = payload.types; | ||
const typesFilter = payload.types || store.types; | ||
@@ -77,15 +77,7 @@ return new Promise((resolve, reject) => { | ||
let items; | ||
if (typeFilter) { | ||
items = ids.map(id => { | ||
return {type: typeFilter, id}; | ||
const items = _.flatten(ids.map(id => { | ||
return typesFilter.map(type => { | ||
return {type, id}; | ||
}); | ||
} else { | ||
items = _.flatten(ids.map(id => { | ||
return store.types.map(type => { | ||
return {type, id}; | ||
}); | ||
})); | ||
} | ||
})); | ||
@@ -92,0 +84,0 @@ bus.query({role: 'store', cmd: 'batchGet', store: store.name}, {channel, keys: items}) |
@@ -68,3 +68,3 @@ 'use strict'; | ||
const query = payload.query; | ||
const typeFilter = payload.types; | ||
const typesFilter = payload.types || store.types; | ||
@@ -79,15 +79,7 @@ return new Promise((resolve, reject) => { | ||
let items; | ||
if (typeFilter) { | ||
items = ids.map(id => { | ||
return {type: typeFilter, id}; | ||
const items = _.flatten(ids.map(id => { | ||
return typesFilter.map(type => { | ||
return {type, id}; | ||
}); | ||
} else { | ||
items = _.flatten(ids.map(id => { | ||
return store.types.map(type => { | ||
return {type, id}; | ||
}); | ||
})); | ||
} | ||
})); | ||
@@ -94,0 +86,0 @@ bus.query({role: 'store', cmd: 'batchGet', store: store.name}, {channel, keys: items}) |
{ | ||
"name": "@oddnetworks/oddworks", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"description": "An extensible media platform for OTT devices.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/oddworks.js", |
200232
4635