Fix missing return on invalid params
This commit is contained in:
parent
af13b6c9f8
commit
20df70c449
@ -54,9 +54,11 @@ class ChannelsRoutes {
|
|||||||
|
|
||||||
if (index < -1) {
|
if (index < -1) {
|
||||||
res.status(400).send('Invalid index');
|
res.status(400).send('Invalid index');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (['open', 'active', 'closed'].includes(status) === false) {
|
if (['open', 'active', 'closed'].includes(status) === false) {
|
||||||
res.status(400).send('Invalid status');
|
res.status(400).send('Invalid status');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const channels = await channelsApi.$getChannelsForNode(req.query.public_key, index, 10, status);
|
const channels = await channelsApi.$getChannelsForNode(req.query.public_key, index, 10, status);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user