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.
2 parents 8c1c428 + 285a903 commit 84c80d8Copy full SHA for 84c80d8
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