mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
feat(Google Drive Node): Add move to trash support (#3693)
* feat(Google Drive Node): Add move to trash support
* ⚡ Improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
parent
35e90dcb1a
commit
74064325c8
|
@ -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',
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue