Create/Update Comments fails in mflix

Hi,

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

My code in addComment is:

const commentDoc = {
name: user.name,
email: user.email,
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?
Thanks!

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