Search...
onCommentUnvoted( )
A backend event that fires when a vote is removed from a forum comment.
Description
The onCommentUnvoted()
event handler runs when a vote is removed from a forum comment.
The received UnvotedComment
object contains information about the comment that was unvoted.
Notes:
Only comments on posts with a
postType
of"QUESTION"
can be voted on.Backend events are not fired when previewing your site.
Syntax
function onCommentUnvoted(event: UnvotedComment): void
onCommentUnvoted Parameters
NAME
TYPE
DESCRIPTION
event
UnvotedComment
Information about the forum comment that was upvoted.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
A backend event that occurs when a forum comment is upvoted
Copy Code
1// Place this code in a file named events.js2// in the Backend section of your code files.34export function wixForum_onCommentUpvoted(event) {5 const upvotedCommentId = event.commentId;6 console.log("Comment upvoted");7}