mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
feat(Google Drive Node): Add Shared Drive support for operations upload, delete and share (#3294)
This commit is contained in:
parent
c885115768
commit
03cdb1fea4
|
@ -2232,7 +2232,7 @@ export class GoogleDrive implements INodeType {
|
|||
json: false,
|
||||
};
|
||||
|
||||
const file = await googleApiRequest.call(this, 'GET', `/drive/v3/files/${fileId}`, {}, { fields: 'mimeType' });
|
||||
const file = await googleApiRequest.call(this, 'GET', `/drive/v3/files/${fileId}`, {}, { fields: 'mimeType', supportsTeamDrives: true });
|
||||
let response;
|
||||
|
||||
if (file.mimeType.includes('vnd.google-apps')) {
|
||||
|
@ -2521,7 +2521,7 @@ export class GoogleDrive implements INodeType {
|
|||
|
||||
const fileId = this.getNodeParameter('fileId', i) as string;
|
||||
|
||||
const response = await googleApiRequest.call(this, 'DELETE', `/drive/v3/files/${fileId}`);
|
||||
await googleApiRequest.call(this, 'DELETE', `/drive/v3/files/${fileId}`, {}, { supportsTeamDrives: true });
|
||||
|
||||
// If we are still here it did succeed
|
||||
returnData.push({
|
||||
|
@ -2539,7 +2539,9 @@ export class GoogleDrive implements INodeType {
|
|||
|
||||
const body: IDataObject = {};
|
||||
|
||||
const qs: IDataObject = {};
|
||||
const qs: IDataObject = {
|
||||
supportsTeamDrives: true,
|
||||
};
|
||||
|
||||
if (permissions.permissionsValues) {
|
||||
Object.assign(body, permissions.permissionsValues);
|
||||
|
|
Loading…
Reference in a new issue