From 9b5c338a904d4c2184439c5b6819d5fbbcd9dacb Mon Sep 17 00:00:00 2001 From: srgooglo Date: Fri, 27 Jan 2023 00:00:32 +0100 Subject: [PATCH] fix function endpoint transformation --- src/server/classes/controller/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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