Search.../

markComment( )

Developer Preview

Sets marked to "TRUE" to mark a comment.

Description

You can then filter for marked comments with the queryComments() function to apply customizations.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function markComment(commentId: string): Promise<MarkCommentResponse>

markComment Parameters

NAME
TYPE
DESCRIPTION
commentId
string

ID of the comment to mark.

Returns

Return Type:

Promise<
MarkCommentResponse
>
NAME
TYPE
DESCRIPTION
comment
Comment

Marked comment.

Was this helpful?

markComment example

Copy Code
1import { comments } from 'wix-comments.v2';
2
3 async function markComment(commentId, options) {
4 try {
5 const result = await comments.markComment(commentId, options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13