mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
Remove suffix from URL for user add operation
This commit is contained in:
parent
ebf81a887b
commit
cbeeffe805
|
@ -45,6 +45,13 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio
|
|||
};
|
||||
|
||||
options.uri = `${credentials.webDavUrl}/${encodeURI(endpoint)}`;
|
||||
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
|
||||
if (resource === 'user' && operation === 'add') {
|
||||
options.uri = options.uri.replace('/remote.php/webdav', '');
|
||||
}
|
||||
console.log(options);
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue