Fix missing return on invalid params

This commit is contained in:
softsimon 2024-04-30 02:02:53 +07:00
parent af13b6c9f8
commit 20df70c449
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -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);