From de93f831ad379aaaa9800bdd896c72c13f99759b Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Sun, 9 Oct 2022 14:57:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E5=BA=94=E7=94=A8=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/controllers/alarm/app.js b/api/app/lib/controllers/alarm/app.js index 89fd936..354e8d6 100644 --- a/api/app/lib/controllers/alarm/app.js +++ b/api/app/lib/controllers/alarm/app.js @@ -133,7 +133,7 @@ async function notedInspection (ctx) { async function apiError (ctx) { try { const models = ctx.fs.dc.models; - const { projectAppId, alarmContent, router, statusCode, screenshot = '', type } = ctx.request.body + const { projectAppId, alarmContent, router, statusCode = null, screenshot = '', type } = ctx.request.body const now = moment().format() if (!type) { From 6bf3e45fa1b0ddb022c381124b5a49e2c25dc0a3 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Sun, 9 Oct 2022 16:20:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix=205764=20=E5=BA=94=E7=94=A8=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=90=9C=E7=B4=A2=E6=A0=8F=E8=BE=93=E5=85=A5=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=90=9C=E7=B4=A2=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/app/lib/controllers/alarm/app.js b/api/app/lib/controllers/alarm/app.js index 354e8d6..bd16e84 100644 --- a/api/app/lib/controllers/alarm/app.js +++ b/api/app/lib/controllers/alarm/app.js @@ -254,6 +254,10 @@ async function apiErrorList (ctx) { '$app->projectCorrelations.pep_project_id$': { $in: projectRes.map(p => p.id) }, + } + ) + findOption.where.$or.push( + { '$app.name$': { $like: `%${keyword}%` } } ) From dbf3425f50dcb2cd80787c4ff117b608a7554933 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Sun, 9 Oct 2022 16:23:10 +0800 Subject: [PATCH 3/3] vcmpAppAuthToken debug --- api/app/lib/controllers/alarm/video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/controllers/alarm/video.js b/api/app/lib/controllers/alarm/video.js index 18df667..afd58c4 100644 --- a/api/app/lib/controllers/alarm/video.js +++ b/api/app/lib/controllers/alarm/video.js @@ -294,7 +294,7 @@ async function vcmpAppAuthToken (ctx) { ctx.status = 200; ctx.body = { token } } catch (error) { - ctx.fs.logger.error(`path: ${ctx.path}, error: error`); + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; ctx.body = { message: typeof error == 'string' ? error : undefined