Ticket Create/Update Documents

Hi guys,

After a lot of hours… I cannot do with the answer… I’ve checked all, and tried all… but nok…

This is my 2 codes for 2 functions:

const commentDoc = { movieId: ObjectId(movieId), name: user.name, email: user.email, text: comment, date :date }

const updateResponse = await comments.updateOne(
{ _id: ObjectId(commentId), email: userEmail },
{ $set: { text: text , date: date} },
)

I expect all it’s ok but not…
If I use without ObjectId(…) I get the third test ok… but with ObjectId I get all three nok…

Any hint?

THis is my error:


BTW: All past tests were ok.

Thanks in advance,

Xavi

1 Like

Hi Xavi,

I think that the problem is that you are writing “movieId” instead of “movie_id” in the “commentDoc” constant…

1 Like

Hi Augusto,

Thanks a lot !!! I was unable to see this… I was in a tunnel…

Best regards,

Xavi

1 Like