mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
@@ -13,6 +13,7 @@ import {
|
||||
import {
|
||||
dropboxApiRequest,
|
||||
dropboxpiRequestAllItems,
|
||||
getCredentials,
|
||||
getRootDirectory,
|
||||
simplify,
|
||||
} from './GenericFunctions';
|
||||
@@ -793,15 +794,20 @@ export class Dropbox implements INodeType {
|
||||
let headers: IDataObject = {};
|
||||
let simple = false;
|
||||
|
||||
// get the root directory to set it as the default search folder
|
||||
const { root_info: { root_namespace_id } } = await getRootDirectory.call(this);
|
||||
|
||||
headers = {
|
||||
'dropbox-api-path-root': JSON.stringify({
|
||||
'.tag': 'root',
|
||||
'root': root_namespace_id,
|
||||
}),
|
||||
};
|
||||
const { accessType } = getCredentials.call(this);
|
||||
|
||||
if (accessType === 'full') {
|
||||
// get the root directory to set it as the default for all operations
|
||||
const { root_info: { root_namespace_id } } = await getRootDirectory.call(this);
|
||||
|
||||
headers = {
|
||||
'dropbox-api-path-root': JSON.stringify({
|
||||
'.tag': 'root',
|
||||
'root': root_namespace_id,
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
body = {};
|
||||
|
||||
Reference in New Issue
Block a user