From 85b323a3a38d82c6ed3fed224658e2edfe397192 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 3 Nov 2023 13:19:51 +0100 Subject: [PATCH] add missed return --- lib/server/handlers/sthGetDataHandler.js | 4 ++-- lib/server/handlers/sthGetDataHandlerV2.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/server/handlers/sthGetDataHandler.js b/lib/server/handlers/sthGetDataHandler.js index 472cfcb..7c82bfa 100644 --- a/lib/server/handlers/sthGetDataHandler.js +++ b/lib/server/handlers/sthGetDataHandler.js @@ -436,10 +436,10 @@ function getDataHandler(request, reply, replyHandler) { } } } - getRawData(request, reply, replyHandler); + return getRawData(request, reply, replyHandler); } else if (request.query.aggrMethod && request.query.aggrPeriod) { // Aggregated data is requested - getAggregatedData(request, reply, replyHandler); + return getAggregatedData(request, reply, replyHandler); } else { message = 'A combination of the following query params is required: lastN, hLimit and hOffset, ' + diff --git a/lib/server/handlers/sthGetDataHandlerV2.js b/lib/server/handlers/sthGetDataHandlerV2.js index 3990c20..dbc5d42 100644 --- a/lib/server/handlers/sthGetDataHandlerV2.js +++ b/lib/server/handlers/sthGetDataHandlerV2.js @@ -55,7 +55,7 @@ function getDataHandler(request, reply) { request.params.entityType = request.query.type; request.params.version = 2; - sthGetDataHandlerV1(request, null, replyHandler); + return sthGetDataHandlerV1(request, null, replyHandler); } module.exports = getDataHandler;