diff --git a/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts b/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts index 05cf481..8f6fcd5 100644 --- a/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts +++ b/nodes/GwezzChangdunovel/GwezzChangdunovel.node.ts @@ -51,13 +51,6 @@ export class GwezzChangdunovel implements INodeType { inputs: ['main'], outputs: ['main'], credentials: [{ name: 'gwezzChangdunovelApi', required: true }], - requestDefaults: { - baseURL: 'https://www.changdunovel.com/novelsale/openapi', - headers: { - Accept: 'application/json', - 'Content-Type': 'application/json', - }, - }, properties: [ { displayName: '资源', @@ -80,6 +73,8 @@ export class GwezzChangdunovel implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; + const baseURL: string = 'https://www.changdunovel.com/novelsale/openapi'; + const resource = this.getNodeParameter('resource', 0); const operation = this.getNodeParameter('operation', 0); @@ -102,8 +97,9 @@ export class GwezzChangdunovel implements INodeType { }; responseData = await this.helpers.httpRequest({ + baseURL: baseURL, + url: '/content/book_meta/v1/', method: 'GET', - url: '/v1/content/book/meta', qs, }); }