n8n-nodes-mautic-advanced 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,16 +15,16 @@ async function mauticApiRequest(method, endpoint, body = {}, query, uri) {
|
|
|
15
15
|
try {
|
|
16
16
|
let returnData;
|
|
17
17
|
if (authenticationMethod === 'credentials') {
|
|
18
|
-
const credentials = await this.getCredentials('
|
|
18
|
+
const credentials = await this.getCredentials('mauticAdvancedApi');
|
|
19
19
|
const baseUrl = credentials.url;
|
|
20
20
|
options.uri = `${baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl}${options.uri}`;
|
|
21
|
-
returnData = await this.helpers.requestWithAuthentication.call(this, '
|
|
21
|
+
returnData = await this.helpers.requestWithAuthentication.call(this, 'mauticAdvancedApi', options);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
const credentials = await this.getCredentials('
|
|
24
|
+
const credentials = await this.getCredentials('mauticAdvancedOAuth2Api');
|
|
25
25
|
const baseUrl = credentials.url;
|
|
26
26
|
options.uri = `${baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl}${options.uri}`;
|
|
27
|
-
returnData = await this.helpers.requestOAuth2.call(this, '
|
|
27
|
+
returnData = await this.helpers.requestOAuth2.call(this, 'mauticAdvancedOAuth2Api', options, {
|
|
28
28
|
includeCredentialsOnRefreshOnBody: true,
|
|
29
29
|
});
|
|
30
30
|
}
|
package/package.json
CHANGED