add includeAll option

This commit is contained in:
Diamond Lewis
2018-06-14 11:50:45 -05:00
committed by Arthur Cinader
parent 2ef437a2bc
commit 00252cbeff
3 changed files with 102 additions and 1 deletions

View File

@@ -100,7 +100,7 @@ export class ClassesRouter extends PromiseRouter {
static optionsFromBody(body) {
const allowConstraints = ['skip', 'limit', 'order', 'count', 'keys',
'include', 'redirectClassNameForKey', 'where'];
'include', 'includeAll', 'redirectClassNameForKey', 'where'];
for (const key of Object.keys(body)) {
if (allowConstraints.indexOf(key) === -1) {
@@ -128,6 +128,9 @@ export class ClassesRouter extends PromiseRouter {
if (body.include) {
options.include = String(body.include);
}
if (body.includeAll) {
options.includeAll = true;
}
return options;
}