This commit is contained in:
2025-10-29 21:37:00 +08:00
parent 3fe1e332b0
commit be3e4cb912
3 changed files with 6 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ export class GwezzChangdunovelApi implements ICredentialType {
properties: INodeProperties[] = [ properties: INodeProperties[] = [
{ {
displayName: 'distributor_id', displayName: 'Distributor ID',
name: 'distributor_id', name: 'distributor_id',
type: 'string', type: 'string',
required: true, required: true,
@@ -19,7 +19,7 @@ export class GwezzChangdunovelApi implements ICredentialType {
description: '分销商 ID可与常读商务同学沟通获取', description: '分销商 ID可与常读商务同学沟通获取',
}, },
{ {
displayName: 'secret_key', displayName: 'Secret Key',
name: 'secret_key', name: 'secret_key',
type: 'string', type: 'string',
typeOptions: { password: true }, typeOptions: { password: true },
@@ -31,7 +31,7 @@ export class GwezzChangdunovelApi implements ICredentialType {
test: ICredentialTestRequest = { test: ICredentialTestRequest = {
request: { request: {
url: 'https://www.changdunovel.com/novelsale/openap', url: 'https://www.changdunovel.com/novelsale/openapi',
}, },
}; };
} }

View File

@@ -87,9 +87,10 @@ export class GwezzChangdunovel implements INodeType {
const distributorId = credentials.distributor_id as string; const distributorId = credentials.distributor_id as string;
const secretKey = credentials.secret_key as string; const secretKey = credentials.secret_key as string;
let responseData;
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
try { try {
let responseData;
if (resource === 'distribution') { if (resource === 'distribution') {
if (operation === 'contentBookMetaV1') { if (operation === 'contentBookMetaV1') {
const bookId = this.getNodeParameter('book_id', i) as string; const bookId = this.getNodeParameter('book_id', i) as string;

View File

@@ -19,12 +19,7 @@ export const distributionDescription: INodeProperties[] = [
name: '获取书籍信息', name: '获取书籍信息',
value: 'contentBookMetaV1', value: 'contentBookMetaV1',
action: '获取书籍信息', action: '获取书籍信息',
routing: { description: '通过书籍 ID 获取书籍的元信息',
request: {
method: 'GET',
url: '/content/book_meta/v1/',
},
},
}, },
], ],
default: 'contentBookMetaV1', default: 'contentBookMetaV1',