onPostCreated( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

A new post was created.

Method Declaration
Copy
function wixForumV1_onPostCreated(event: PostCreated): void;
Method Parameters
eventPostCreated
onPostCreated example
JavaScript
export function wixForumV1_onPostCreated(event) { const eventId = event.metadata.id; const entityId = event.entity._id; }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onPostDeleted( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

An existing post was removed.

Method Declaration
Copy
function wixForumV1_onPostDeleted(event: PostDeleted): void;
Method Parameters
eventPostDeleted
onPostDeleted example
JavaScript
export function wixForumV1_onPostDeleted(event) { const eventId = event.metadata.id; const entityId = event.entity._id; }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onPostLiked( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

An existing post was liked.

Method Declaration
Copy
function wixForumV1_onPostLiked(event: PostLiked): void;
Method Parameters
eventPostLiked
onPostLiked example
JavaScript
export function wixForumV1_onPostLiked(event) { const eventId = event.metadata.id; const entityId = event.data.post._id; }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onPostMoved( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

An existing post was moved to a different category.

Method Declaration
Copy
function wixForumV1_onPostMoved(event: PostMoved): void;
Method Parameters
eventPostMoved
onPostMoved example
JavaScript
export function wixForumV1_onPostMoved(event) { const eventId = event.metadata.id; const entityId = event.data.post._id; }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onPostOpened( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

An existing post was opened for further comments.

Method Declaration
Copy
function wixForumV1_onPostOpened(event: PostOpened): void;
Method Parameters
eventPostOpened
onPostOpened example
JavaScript
export function wixForumV1_onPostOpened(event) { const eventId = event.metadata.id; const entityId = event.data.post._id; }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?