From 5aac8ae0e245f381cd6e0250f947c005549c6b43 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Tue, 21 Apr 2015 22:57:58 -0400 Subject: [PATCH] If an override exists, passing the controller as expected, not the overridden function --- lib/server/route/restify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/route/restify.js b/lib/server/route/restify.js index 160217b..8a27401 100644 --- a/lib/server/route/restify.js +++ b/lib/server/route/restify.js @@ -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]); }