mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
⚡ Minor improvement to NextCloud Node
This commit is contained in:
@@ -20,7 +20,7 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
|
||||
const options : OptionsWithUri = {
|
||||
const options: OptionsWithUri = {
|
||||
headers,
|
||||
method,
|
||||
body,
|
||||
|
||||
@@ -695,7 +695,6 @@ export class NextCloud implements INodeType {
|
||||
}
|
||||
|
||||
} else if (resource === 'user') {
|
||||
|
||||
if (operation === 'create') {
|
||||
// ----------------------------------
|
||||
// user:create
|
||||
@@ -774,7 +773,12 @@ export class NextCloud implements INodeType {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
resolve(data as IDataObject);
|
||||
|
||||
if (data.ocs.meta.status !== 'ok') {
|
||||
return reject(new Error(data.ocs.meta.message));
|
||||
}
|
||||
|
||||
resolve(data.ocs.data as IDataObject);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user