Ticket: User Management M220JS - loginUser

because I didn’t notice that upsert goes in to updateOne scope…I corrected it…
now I am dealing with addUser…

Some of us are starting in javascript. We don’t all know what you know. I see nothing wrong to help us.

As I wrote posting code that is a solution or potential solution to a lab is against the forum’s policy. I do not make the rule.

But personnaly, to give an answer is not helping someone. Making him discover his mistake is more helpfull.

Give a man a fish and you feed him for the day, teach a man to fish and you feed him for the rest of his life.

hi, try this,

await sessions.updateOne(
{ user_id: email },
{ $set: { “jwt”: jwt } },
{ upsert: true},
upsert true add then i pass

Hi, have you tried looking at the actual site and seeing if there is actually a problem? I had a similar problem with the login portion, but when I went to localhost:5000 and tested the functionality, I didn’t see any problems. I ran the validation and got the correct message. Not sure what was up with the test case, but the code works.

1 Like