Possible Fix to Create/Update Comments


I found an issue in the code of MoviesService, in the method updateMovieComment.

In javascript (validationHelpers.js#editComment), this is the JSON body sent by the app:

    comment_id: commentID,
    updated_comment: update, // The updated comment text

But the method expects the comment text field (in the request payload) to be named “comment”, hence the text is always set to null and the verification fails to compare the first comment text:

MoviesService#updateMovieComment {
    // Other code...
    // updateComment.setText(commentBody.get("comment")); // This is wrong
    updateComment.setText(commentBody.get("updated_comment")); // This fixed my issues.

   // More code...

Hope this helps.

Hi @nicomv,

I’ll have a look to this.
Thanks for flagging.


1 Like