From 6ca6a5b8b6b624d3969a70e3efc9f8c3e899986d Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 9 Sep 2024 13:03:44 -0700 Subject: [PATCH] lint --- server/utils/agents/imported.js | 2 +- server/utils/http/index.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/utils/agents/imported.js b/server/utils/agents/imported.js index bd14286627..136f4a3ad1 100644 --- a/server/utils/agents/imported.js +++ b/server/utils/agents/imported.js @@ -129,7 +129,7 @@ class ImportedPlugin { parseCallOptions() { const callOpts = {}; - if (!this.config.setup_args || typeof this.config.setup_args !== 'object') { + if (!this.config.setup_args || typeof this.config.setup_args !== "object") { return callOpts; } for (const [param, definition] of Object.entries(this.config.setup_args)) { diff --git a/server/utils/http/index.js b/server/utils/http/index.js index 860cf9fd4c..7e76f327d9 100644 --- a/server/utils/http/index.js +++ b/server/utils/http/index.js @@ -48,7 +48,7 @@ async function userFromSession(request, response = null) { function decodeJWT(jwtToken) { try { return JWT.verify(jwtToken, process.env.JWT_SECRET); - } catch { } + } catch {} return { p: null, id: null, username: null }; } @@ -68,18 +68,18 @@ function safeJsonParse(jsonString, fallback = null) { try { return JSON.parse(jsonString); - } catch { } + } catch {} if (jsonString?.startsWith("[") || jsonString?.startsWith("{")) { try { const repairedJson = jsonrepair(jsonString); return JSON.parse(repairedJson); - } catch { } + } catch {} } try { return extract(jsonString)[0]; - } catch { } + } catch {} return fallback; } @@ -89,7 +89,7 @@ function isValidUrl(urlString = "") { const url = new URL(urlString); if (!["http:", "https:"].includes(url.protocol)) return false; return true; - } catch (e) { } + } catch (e) {} return false; }