mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Small details and logs
This commit is contained in:
parent
9290993400
commit
6e4b6f677e
|
@ -45,7 +45,7 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio
|
||||||
};
|
};
|
||||||
|
|
||||||
options.uri = `${credentials.webDavUrl}/${encodeURI(endpoint)}`;
|
options.uri = `${credentials.webDavUrl}/${encodeURI(endpoint)}`;
|
||||||
|
console.log(options);
|
||||||
return await this.helpers.request(options);
|
return await this.helpers.request(options);
|
||||||
} else {
|
} else {
|
||||||
const credentials = this.getCredentials('nextCloudOAuth2Api');
|
const credentials = this.getCredentials('nextCloudOAuth2Api');
|
||||||
|
@ -58,6 +58,7 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio
|
||||||
return await this.helpers.requestOAuth2!.call(this, 'nextCloudOAuth2Api', options);
|
return await this.helpers.requestOAuth2!.call(this, 'nextCloudOAuth2Api', options);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
throw new Error(`NextCloud Error. Status Code: ${error.statusCode}. Message: ${error.message}`);
|
throw new Error(`NextCloud Error. Status Code: ${error.statusCode}. Message: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -526,7 +526,7 @@ export class NextCloud implements INodeType {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
placeholder: 'john',
|
placeholder: 'john',
|
||||||
description: 'The user to add.',
|
description: 'The ID of the user to add.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Email',
|
displayName: 'Email',
|
||||||
|
@ -701,7 +701,7 @@ export class NextCloud implements INodeType {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
requestMethod = 'POST';
|
requestMethod = 'POST';
|
||||||
|
|
||||||
endpoint = `/ocs/v1.php/cloud/users`;
|
endpoint = 'ocs/v1.php/cloud/users';
|
||||||
|
|
||||||
headers['OCS-APIRequest'] = true;
|
headers['OCS-APIRequest'] = true;
|
||||||
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||||
|
@ -737,6 +737,7 @@ export class NextCloud implements INodeType {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseData = await nextCloudApiRequest.call(this, requestMethod, endpoint, body, headers, encoding);
|
responseData = await nextCloudApiRequest.call(this, requestMethod, endpoint, body, headers, encoding);
|
||||||
|
console.log(responseData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (this.continueOnFail() === true) {
|
if (this.continueOnFail() === true) {
|
||||||
returnData.push({ error });
|
returnData.push({ error });
|
||||||
|
|
Loading…
Reference in a new issue