Skip to content

Commit

Permalink
feat(Google Drive Node): Add move to trash support (#3693)
Browse files Browse the repository at this point in the history
* feat(Google Drive Node): Add move to trash support

* ⚡ Improvements

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
  • Loading branch information
oaygalenq and RicardoE105 committed Jul 15, 2022
1 parent 35e90dc commit 7406432
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts
Expand Up @@ -915,6 +915,13 @@ export class GoogleDrive implements INodeType {
default: false,
description: 'Whether to set the \'keepForever\' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.',
},
{
displayName: 'Move to Trash',
name: 'trashed',
type: 'boolean',
default: false,
description: 'Whether to move a file to the trash. Only the owner may trash a file.',
},
{
displayName: 'OCR Language',
name: 'ocrLanguage',
Expand Down Expand Up @@ -2498,6 +2505,10 @@ export class GoogleDrive implements INodeType {
body.name = updateFields.fileName;
}

if (updateFields.hasOwnProperty('trashed')) {
body.trashed = updateFields.trashed;
}

if (updateFields.parentId && updateFields.parentId !== '') {
qs.addParents = updateFields.parentId;
}
Expand Down

0 comments on commit 7406432

Please sign in to comment.