Skip to content

Commit

Permalink
Clear handler cache on add or disable remoteMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedEssehemy committed Sep 24, 2018
1 parent 0bb7cd6 commit 7aa7191
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ app.model = function(Model, config) {

var self = this;
Model.on('remoteMethodDisabled', function(model, methodName) {
clearHandlerCache(self);
self.emit('remoteMethodDisabled', model, methodName);
});
Model.on('remoteMethodAdded', function(model) {
clearHandlerCache(self);
self.emit('remoteMethodAdded', model);
});

Expand Down

0 comments on commit 7aa7191

Please sign in to comment.