[Solution] Create/Update Comments

Hi Everyone,

Hope you are enjoying the course. :slight_smile: If you are struggling with Create/Update Comments Ticket, please follow these amazing points mentioned by @Luis_40892.

i finally figured it out. in my case, there was nothing wrong with my update_comment() , nor delete_comment() code, but there were 2 other functions that i had to tweak to get the validation codes.

for others running into this same issue, make sure that:

  • the comments returned in the mongo doc by get_movie() are sorted in descending order by date
  • movie_id in add_comment() gets converted to ObjectId
  • comment_id in update_comment() and delete_comment() is also converted to ObjectId

i really wish there were better feedback from the api, and by the way, you can get a validation code from the Get Comments ticket, even if you don’t sort the returning result, which might be the reason why there is this many posts related to this issue.

Please do not hesitate to create a new topic if you are still facing issues.

Kanika

13 Likes