mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Improvements
This commit is contained in:
@@ -485,7 +485,8 @@ export class Dropbox implements INodeType {
|
||||
let endpoint = '';
|
||||
let requestMethod = '';
|
||||
let body: IDataObject | Buffer;
|
||||
let isJson = false;
|
||||
let options;
|
||||
const query: IDataObject = {};
|
||||
|
||||
const headers: IDataObject = {};
|
||||
|
||||
@@ -624,7 +625,7 @@ export class Dropbox implements INodeType {
|
||||
options = { encoding: null };
|
||||
}
|
||||
|
||||
let responseData = await dropboxApiRequest.call(this, requestMethod, endpoint, body, headers, options);
|
||||
let responseData = await dropboxApiRequest.call(this, requestMethod, endpoint, body, query, headers, options);
|
||||
|
||||
if (resource === 'file' && operation === 'upload') {
|
||||
responseData = JSON.parse(responseData);
|
||||
|
||||
@@ -20,11 +20,12 @@ import {
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function dropboxApiRequest(this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, body: object, headers?: object, option: IDataObject = {}): Promise<any> {// tslint:disable-line:no-any
|
||||
export async function dropboxApiRequest(this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, body: object, query: IDataObject = {}, headers?: object, option: IDataObject = {}): Promise<any> {// tslint:disable-line:no-any
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers,
|
||||
method,
|
||||
qs: query,
|
||||
body,
|
||||
uri: endpoint,
|
||||
json: true,
|
||||
|
||||
Reference in New Issue
Block a user