saveShaderComments method

  1. @override
Future<SaveShaderCommentsResponse> saveShaderComments(
  1. String shaderId,
  2. List<Comment> comments
)

Saves a list of shaderId comments

On success the list of comments was saved

In case of error a ResponseError is set on SaveShaderCommentsResponse

Implementation

@override
Future<SaveShaderCommentsResponse> saveShaderComments(
    String shaderId, List<Comment> comments) {
  return catchSqlError<SaveShaderCommentsResponse>(
      store.commentDao
          .saveAll(comments)
          .then((reponse) => SaveShaderCommentsResponse()),
      (sqle) => SaveShaderCommentsResponse(
          error: toResponseError(sqle,
              context: contextComment, target: shaderId)),
      options);
}