From f68ae33cd8b7ca57ea9c7aec0baa927f9b474829 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Tue, 12 Nov 2024 18:28:57 +0800 Subject: [PATCH] perf: outlink default value (#3134) --- packages/global/support/outLink/type.d.ts | 4 ++-- packages/service/support/outLink/schema.ts | 6 ++---- projects/app/src/web/core/app/constants.ts | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/global/support/outLink/type.d.ts b/packages/global/support/outLink/type.d.ts index 4c8435963..e33179c1a 100644 --- a/packages/global/support/outLink/type.d.ts +++ b/packages/global/support/outLink/type.d.ts @@ -52,9 +52,9 @@ export type OutLinkSchema = { // whether the response content is detailed responseDetail: boolean; // whether to hide the node status - showNodeStatus: boolean; + showNodeStatus?: boolean; // whether to show the complete quote - showRawSource: boolean; + showRawSource?: boolean; // response when request immediateResponse?: string; diff --git a/packages/service/support/outLink/schema.ts b/packages/service/support/outLink/schema.ts index f72d3fa75..51e470a94 100644 --- a/packages/service/support/outLink/schema.ts +++ b/packages/service/support/outLink/schema.ts @@ -48,12 +48,10 @@ const OutLinkSchema = new Schema({ default: false }, showNodeStatus: { - type: Boolean, - default: false + type: Boolean }, showRawSource: { - type: Boolean, - default: false + type: Boolean }, limit: { maxUsagePoints: { diff --git a/projects/app/src/web/core/app/constants.ts b/projects/app/src/web/core/app/constants.ts index 3ca5c1686..b5be91474 100644 --- a/projects/app/src/web/core/app/constants.ts +++ b/projects/app/src/web/core/app/constants.ts @@ -22,8 +22,8 @@ export const defaultApp: AppDetailType = { export const defaultOutLinkForm: OutLinkEditType = { name: '', + showNodeStatus: true, responseDetail: false, - showNodeStatus: false, showRawSource: false, limit: { QPM: 100,