From 20df70c44927cccfda6b5f33007c0708304151c1 Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 30 Apr 2024 02:02:53 +0700 Subject: [PATCH] Fix missing return on invalid params --- backend/src/api/explorer/channels.routes.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/api/explorer/channels.routes.ts b/backend/src/api/explorer/channels.routes.ts index f28ab2a9d..391bf628e 100644 --- a/backend/src/api/explorer/channels.routes.ts +++ b/backend/src/api/explorer/channels.routes.ts @@ -54,9 +54,11 @@ class ChannelsRoutes { if (index < -1) { res.status(400).send('Invalid index'); + return; } if (['open', 'active', 'closed'].includes(status) === false) { res.status(400).send('Invalid status'); + return; } const channels = await channelsApi.$getChannelsForNode(req.query.public_key, index, 10, status);