Search.../

onPostReported( )

A backend event that fires when a forum post is reported.

Description

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.

Syntax

function onPostReported(event: ReportedPost): void

onPostReported Parameters

NAME
TYPE
DESCRIPTION
event
ReportedPost

Information about the forum post that was reported.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

A backend event that occurs when a forum post is reported

Copy Code
1// Place this code in a file named events.js
2// in the Backend section of your code files.
3
4export function wixForum_onPostReported(event) {
5 const reportedPostId = event.postId;
6 const typeOfReport = event.reportType;
7 console.log("Post reported");
8}