Create/Update Comments fails in mflix


My test in mflix returns: “Create/Update Comments: Update was performed but unsuccessful”.

My code in addComment is:

const commentDoc = {
movie_id: new ObjectId(movieId),
text: comment,
date: date

and in updateComment is:

const updateResponse = await comments.updateOne(
{ “email”: userEmail },
{ $set: { commentId: “commentId” } },

Has somebody any suggestion?

Hey @Fabio_24007 Looking at your code I think you may need to read the instruction comments again to help you out. :wink:

// TODO Ticket: Create/Update Comments
// Use the commentId and userEmail to select the proper comment, then
// update the "text" and "date" fields of the selected comment.
1 Like