editComment method

Future<Comment> editComment({
  1. required Comment comment,
  2. required String content,
  3. String? token,
})

Edit a comment. Parameters

  • comment The comment to edit
  • content Comment content
  • token The token to use for authentication (optional if you have set a global token).

Implementation

Future<Comment> editComment(
    {required Comment comment,
    required String content,
    String? token}) async {
  APIHttpResponse response = await httpClient.patch(
      '/comment/${comment.uuid}',
      body: {'content': content},
      token: token);

  return Comment.fromMap(response.data);
}