From db960d585a244716e683ac726b25c5e3aba57f95 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Thu, 19 Jun 2025 23:46:23 -0400 Subject: [PATCH] fix: add support for new Endpoint usage --- src/backend/src/util/expressutil.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/src/util/expressutil.js b/src/backend/src/util/expressutil.js index eb3fbdeb8..a0ee952a7 100644 --- a/src/backend/src/util/expressutil.js +++ b/src/backend/src/util/expressutil.js @@ -18,7 +18,7 @@ */ const eggspress = require("../api/eggspress"); -const Endpoint = function Endpoint (spec) { +const Endpoint = function Endpoint (spec, handler) { return { attach (route) { const eggspress_options = { @@ -31,7 +31,7 @@ const Endpoint = function Endpoint (spec) { const eggspress_router = eggspress( spec.route, eggspress_options, - spec.handler, + handler ?? spec.handler, ); route.use(eggspress_router); },