elderwand 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,7 @@ module.exports.inherit = function (child) {
93
93
  page: page + 1,
94
94
  pages: pages,
95
95
  perPage: perPage,
96
+ isFiltered: Object.keys(req.anyKey).length > 0 ? true : false,
96
97
  //menu: utils.getUserMenu(req.user),
97
98
  };
98
99
  data[child.pluralName] = models;
@@ -126,6 +127,10 @@ module.exports.inherit = function (child) {
126
127
 
127
128
 
128
129
  var criteria = {}
130
+ if(child.model.generateFilter){
131
+ criteria.inject(child.model.generateCriteria(req.anyKey))
132
+ }
133
+
129
134
  if(child.model.listByUserOptions){
130
135
  criteria = child.model.listByUserOptions(options, req.user, callback)
131
136
  }else{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elderwand",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "KLE Technologies Internal Framework",
5
5
  "main": "./node_modules/.bin/nodemon index.js",
6
6
  "scripts": {