A backend event that fires when a forum post is reported.
The onPostReported()
event handler runs when a site visitor reports a post on your site.
The received ReportedPost
object contains information about the post that was reported.
Note: Backend events are not fired when previewing your site.
function onPostReported(event: ReportedPost): void;
Information about the forum post that was reported.
// Place this code in a file named events.js
// in the Backend section of your code files.
export function wixForum_onPostReported(event) {
const reportedPostId = event.postId;
const typeOfReport = event.reportType;
console.log("Post reported");
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.