From b5193cd1aa647ea08476ddbf2c3a7387bf14f273 Mon Sep 17 00:00:00 2001 From: brookshi Date: Mon, 12 Mar 2018 21:28:33 +0800 Subject: [PATCH] should not store body/header if setting is forfail and result is sucess --- api/run_engine/schedule_runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/run_engine/schedule_runner.ts b/api/run_engine/schedule_runner.ts index d0ce5f2..2a62664 100644 --- a/api/run_engine/schedule_runner.ts +++ b/api/run_engine/schedule_runner.ts @@ -167,7 +167,7 @@ export class ScheduleRunner { private async clearRunResult(runResult: RunResult) { const storeContent = Setting.instance.scheduleStoreContent; const isImg = ValidateUtil.isResImg(runResult.headers); - if (isImg || storeContent === 'none' || (storeContent === 'forFail' && !this.isSuccess(runResult))) { + if (isImg || storeContent === 'none' || (storeContent === 'forFail' && this.isSuccess(runResult))) { runResult.body = ''; runResult.headers = {}; }