From 6122e20e3dfe8fbee277b64bbdd4ee42d0b4cdb9 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 25 Aug 2023 17:57:20 +0200 Subject: [PATCH] cli tool: bypass max count if there is a filter --- tools/nodeclient/app.js | 2 +- tools/nodeclient/settings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nodeclient/app.js b/tools/nodeclient/app.js index aaeec02..54287c6 100644 --- a/tools/nodeclient/app.js +++ b/tools/nodeclient/app.js @@ -68,7 +68,7 @@ axios.post(`${settings.url}/handler.php`, .every( (note, i) => { console.log(`[${i}] ${note.title}`) - return i < settings.maxcount; + return Boolean(filter) || i < settings.maxcountifnofilter; }); // todo: open if only one match. quit if no match diff --git a/tools/nodeclient/settings.json b/tools/nodeclient/settings.json index fa4fd04..227734b 100644 --- a/tools/nodeclient/settings.json +++ b/tools/nodeclient/settings.json @@ -1,6 +1,6 @@ { "password": "", "url": "http://localhost:8000", - "maxcount": 50, + "maxcountifnofilter": 10, "command": "sublime_text.exe -w" }