mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Microsoft OneDrive Node): Add rename option for files and folders (#3224)
This commit is contained in:
committed by
GitHub
parent
d8870ecbff
commit
50246d174a
@@ -271,6 +271,15 @@ export class MicrosoftOneDrive implements INodeType {
|
||||
returnData.push(responseData);
|
||||
}
|
||||
}
|
||||
if (resource === 'file' || resource === 'folder') {
|
||||
if (operation === 'rename') {
|
||||
const itemId = this.getNodeParameter('itemId', i) as string;
|
||||
const newName = this.getNodeParameter('newName', i) as string;
|
||||
const body = {name: newName};
|
||||
responseData = await microsoftApiRequest.call(this, 'PATCH', `/drive/items/${itemId}`, body);
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
|
||||
Reference in New Issue
Block a user