deleteShaderComments method

  1. @override
Future<DeleteShaderCommentsResponse> deleteShaderComments(
  1. String shaderId
)

Deletes a list of shaderIds comments

On success the list of comments was deleted

In case of error a ResponseError is set on DeleteShaderCommentsResponse

Implementation

@override
Future<DeleteShaderCommentsResponse> deleteShaderComments(String shaderId) {
  return catchSqlError<DeleteShaderCommentsResponse>(
      store.commentDao
          .deleteByShaderId(shaderId)
          .then((reponse) => DeleteShaderCommentsResponse()),
      (sqle) => DeleteShaderCommentsResponse(
          error: toResponseError(sqle,
              context: contextComment, target: shaderId)),
      options);
}