Skip to content

Commit

Permalink
If an override exists, passing the controller as expected, not the ov…
Browse files Browse the repository at this point in the history
…erridden function
  • Loading branch information
nkcraddock committed Apr 22, 2015
1 parent f892f5e commit 5aac8ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server/route/restify.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ Restify.prototype.model = function (path, modelName, overrideController) {
if (_.isObject(overrideController) &&
_.has(overrideController, verb) &&
_.isFunction(overrideController[verb])) {
self[role](path, overrideController[verb], [verb]);
self[role](path, overrideController, [verb]);
} else {
self[role](path, self._buildController(verb, Model, fields), [verb]);
}
Expand Down

0 comments on commit 5aac8ae

Please sign in to comment.