Updates a comment.
Each time the comment is updated, revision
increments by 1. The current revision
must be
passed when updating the comment. This ensures you're working with the latest comment and
prevents unintended overwrites.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function updateComment(
_id: string,
comment: UpdateComment,
options: UpdateCommentOptions,
): Promise<Comment>;
Comment ID.
import { comments } from "wix-comments.v2";
async function updateComment(id, comment, options) {
try {
const result = await comments.updateComment(id, comment, options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.