Merge pull request #595 from strongloop/feature/disable-remote
Add Model.disableRemoteMethod()
This commit is contained in:
commit
4d2ca3ac94
|
@ -380,6 +380,19 @@ Model.remoteMethod = function(name, options) {
|
|||
this.sharedClass.defineMethod(name, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable remote invocation for the method with the given name.
|
||||
*
|
||||
* @param {String} name The name of the method.
|
||||
* @param {Boolean} isStatic Is the method static (eg. `MyModel.myMethod`)? Pass
|
||||
* `false` if the method defined on the prototype (eg.
|
||||
* `MyModel.prototype.myMethod`).
|
||||
*/
|
||||
|
||||
Model.disableRemoteMethod = function(name, isStatic) {
|
||||
this.sharedClass.disableMethod(name, isStatic || false);
|
||||
}
|
||||
|
||||
Model.belongsToRemoting = function(relationName, relation, define) {
|
||||
var modelName = relation.modelTo && relation.modelTo.modelName;
|
||||
modelName = modelName || 'PersistedModel';
|
||||
|
|
Loading…
Reference in New Issue