A backend event that fires when a forum comment is deleted.
The onCommentDeleted()
event handler runs when an existing forum comment in your site is deleted.
The received DeletedComment
object contains information about the comment that was deleted.
Note: Backend events are not fired when previewing your site.
function onCommentDeleted(event: DeletedComment): void;
Information about the forum comment that was deleted.
// Place this code in a file named events.js
// in the Backend section of your code files.
export function wixForum_onCommentDeleted(event) {
const deletedCommentId = event.commentId;
console.log("Comment deleted");
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.