@@ -110,7 +110,7 @@ function RestQuery(config, auth, className, restWhere = {}, restOptions = {}, cl
|
||||
// reduce to create all paths
|
||||
// ([a,b,c] -> {a: true, 'a.b': true, 'a.b.c': true})
|
||||
return path.split('.').reduce((memo, path, index, parts) => {
|
||||
memo[parts.slice(0, index+1).join('.')] = true;
|
||||
memo[parts.slice(0, index + 1).join('.')] = true;
|
||||
return memo;
|
||||
}, memo);
|
||||
}, {});
|
||||
@@ -552,8 +552,8 @@ function includePath(config, auth, response, path, restOptions = {}) {
|
||||
const keys = new Set(restOptions.keys.split(','));
|
||||
const keySet = Array.from(keys).reduce((set, key) => {
|
||||
const keyPath = key.split('.');
|
||||
let i=0;
|
||||
for (i; i<path.length; i++) {
|
||||
let i = 0;
|
||||
for (i; i < path.length; i++) {
|
||||
if (path[i] != keyPath[i]) {
|
||||
return set;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user