From be3e4cb9121651ed7d85b342d5692f360e873e01 Mon Sep 17 00:00:00 2001 From: sshelgwezz Date: Wed, 29 Oct 2025 21:37:00 +0800 Subject: [PATCH] fix bug --- credentials/GwezzChangdunovelApi.credentials.ts | 6 +++--- nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts | 3 ++- nodes/GwezzChangdunovel/resources/distribution/index.ts | 7 +------ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/credentials/GwezzChangdunovelApi.credentials.ts b/credentials/GwezzChangdunovelApi.credentials.ts index b3dbca1..f86f446 100644 --- a/credentials/GwezzChangdunovelApi.credentials.ts +++ b/credentials/GwezzChangdunovelApi.credentials.ts @@ -11,7 +11,7 @@ export class GwezzChangdunovelApi implements ICredentialType { properties: INodeProperties[] = [ { - displayName: 'distributor_id', + displayName: 'Distributor ID', name: 'distributor_id', type: 'string', required: true, @@ -19,7 +19,7 @@ export class GwezzChangdunovelApi implements ICredentialType { description: '分销商 ID,可与常读商务同学沟通获取', }, { - displayName: 'secret_key', + displayName: 'Secret Key', name: 'secret_key', type: 'string', typeOptions: { password: true }, @@ -31,7 +31,7 @@ export class GwezzChangdunovelApi implements ICredentialType { test: ICredentialTestRequest = { request: { - url: 'https://www.changdunovel.com/novelsale/openap', + url: 'https://www.changdunovel.com/novelsale/openapi', }, }; } diff --git a/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts b/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts index 9fa2a85..d1e35db 100644 --- a/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts +++ b/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts @@ -87,9 +87,10 @@ export class GwezzChangdunovel implements INodeType { const distributorId = credentials.distributor_id as string; const secretKey = credentials.secret_key as string; - let responseData; for (let i = 0; i < items.length; i++) { try { + let responseData; + if (resource === 'distribution') { if (operation === 'contentBookMetaV1') { const bookId = this.getNodeParameter('book_id', i) as string; diff --git a/nodes/GwezzChangdunovel/resources/distribution/index.ts b/nodes/GwezzChangdunovel/resources/distribution/index.ts index b2fe11e..83a38a3 100644 --- a/nodes/GwezzChangdunovel/resources/distribution/index.ts +++ b/nodes/GwezzChangdunovel/resources/distribution/index.ts @@ -19,12 +19,7 @@ export const distributionDescription: INodeProperties[] = [ name: '获取书籍信息', value: 'contentBookMetaV1', action: '获取书籍信息', - routing: { - request: { - method: 'GET', - url: '/content/book_meta/v1/', - }, - }, + description: '通过书籍 ID 获取书籍的元信息', }, ], default: 'contentBookMetaV1',