From 525654f9aec17f1f3fc70fff1e04cde588de50f1 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Fri, 18 Aug 2023 00:20:41 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20fix:=20=E4=BF=AE=E6=AD=A3=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E9=93=BE=E8=B7=AF=E7=9A=84=E5=91=BD=E4=B8=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 2 ++ api/v1/runner.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index afaf303..e93817e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,5 @@ const config = require('@lobehub/lint').eslint; +config.rules['no-extra-boolean-cast'] = 0; + module.exports = config; diff --git a/api/v1/runner.ts b/api/v1/runner.ts index 1a8ec55..b23edb7 100644 --- a/api/v1/runner.ts +++ b/api/v1/runner.ts @@ -25,8 +25,8 @@ export default async (req: Request) => { const item = manifest.plugins.find((i) => i.name === name); - // 先通过插件资产路径查询 - if (item) { + // 先通过插件资产 endpoint 路径查询 + if (!!item?.runtime.endpoint) { const res = await fetch(item.runtime.endpoint, { body: args, method: 'post' }); const data = await res.text(); console.log(`[${name}]`, args, `result:`, data.slice(0, 3600));