diff --git a/src/server/classes/controller/index.js b/src/server/classes/controller/index.js index bef9a1a..27d0410 100644 --- a/src/server/classes/controller/index.js +++ b/src/server/classes/controller/index.js @@ -60,7 +60,7 @@ module.exports = class Controller { this.customHandler = objEndpoint.customHandler } } - } else if (typeof endpoint === "function") { + } else if (typeof endpoint === "function" && typeof endpoint.prototype.constructor === "undefined") { // Handle endpoint transformation as a function const endpointFn = endpoint