MCPcopy Create free account
hub / github.com/dynastic/place / _setupMethodHandler

Method _setupMethodHandler

util/DataModelManager.js:55–60  ·  view source on GitHub ↗
(name, key, isStatic)

Source from the content-addressed store, hash-verified

53 }
54
55 _setupMethodHandler(name, key, isStatic) {
56 if(isStatic) return;
57 mongoose.models[name].prototype[key] = function() {
58 return m._getMethodHandler(name, key, false).apply(this, Array.from(arguments));
59 }
60 }
61
62 _getList(isStatic) {
63 return isStatic ? this.modelStaticMethods : this.modelInstanceMethods;

Callers 2

registerModelMethod · 0.95

Calls 1

_getMethodHandlerMethod · 0.80

Tested by

no test coverage detected