mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Wordpress Node): Add date fields (#17755)
Co-authored-by: Shireen Missi <shireen@n8n.io>
This commit is contained in:
@@ -187,6 +187,9 @@ export class Wordpress implements INodeType {
|
||||
if (additionalFields.format) {
|
||||
body.format = additionalFields.format as string;
|
||||
}
|
||||
if (additionalFields.date) {
|
||||
body.date = additionalFields.date as string;
|
||||
}
|
||||
responseData = await wordpressApiRequest.call(this, 'POST', '/posts', body);
|
||||
}
|
||||
//https://developer.wordpress.org/rest-api/reference/posts/#update-a-post
|
||||
@@ -239,6 +242,9 @@ export class Wordpress implements INodeType {
|
||||
if (updateFields.format) {
|
||||
body.format = updateFields.format as string;
|
||||
}
|
||||
if (updateFields.date) {
|
||||
body.date = updateFields.date as string;
|
||||
}
|
||||
responseData = await wordpressApiRequest.call(this, 'POST', `/posts/${postId}`, body);
|
||||
}
|
||||
//https://developer.wordpress.org/rest-api/reference/posts/#retrieve-a-post
|
||||
|
||||
Reference in New Issue
Block a user