feat(Wordpress Node): Add post template option (#3139)

* Add wordpress post template option

* Fix: Add UI components and fix typo

* Add elementor template options

* Add Standard option

* 🔨 ability to use non elementor template, credential test, linter fixes

* 🔨 removed commented code

*  Improvements

Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Zapfmeister
2022-07-04 09:39:56 +02:00
committed by GitHub
parent a8c16675d0
commit 02bc3da785
7 changed files with 161 additions and 7 deletions

View File

@@ -21,10 +21,6 @@ export async function wordpressApiRequest(this: IExecuteFunctions | IExecuteSing
'Content-Type': 'application/json',
'User-Agent': 'n8n',
},
auth: {
user: credentials!.username as string,
password: credentials!.password as string,
},
method,
qs,
body,
@@ -36,7 +32,8 @@ export async function wordpressApiRequest(this: IExecuteFunctions | IExecuteSing
delete options.body;
}
try {
return await this.helpers.request!(options);
const credentialType = 'wordpressApi';
return this.helpers.requestWithAuthentication.call(this, credentialType, options);
} catch (error) {
throw new NodeApiError(this.getNode(), error);
}