We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c1c428 commit 285a903Copy full SHA for 285a903
server/data_form.js
@@ -359,7 +359,9 @@ DataForm.prototype.models = function () {
359
360
return function (req, res) {
361
// TODO: Make this less wasteful - we only need to send the resourceNames of the resources
362
- res.send(that.resources);
+ // Check for optional modelFilter and call it with the request and current list. Otherwise just return the list.
363
+ res.send(that.options.modelFilter ? that.options.modelFilter.call(null, req, that.resources) : that.resources);
364
+
365
};
366
367
0 commit comments