opencodeiiita / Productivity-Tracker

6 stars 45 forks source link

#82 POST /todo #100

Closed abhi9-hash closed 2 years ago

abhi9-hash commented 2 years ago

Issue: 82

created post '/todo' route and added key.js file in config folder

opencode-bot commented 2 years ago

Hey @abhi9-hash

Thanks for opening this PR :rocket:. Mentor will review your PR soon and till then, keep contributing and stay calm.

Thanks for contributing to OpenCode ✨✨!

untrulynoxiusmj commented 2 years ago

@abhi9-hash use _id field of mongodb document for user_id Also attach screenshots

abhi9-hash commented 2 years ago

please check it

untrulynoxiusmj commented 2 years ago

you will get _id field from req.user

abhi9-hash commented 2 years ago

req.user object has gid, email, photourl, name as attribute. Are you saying user id is stored as req.user._id ?

untrulynoxiusmj commented 2 years ago

_id is mongodb document id So user also has _id field

abhi9-hash commented 2 years ago

_id is mongodb document id So user also has _id field

yes please check the updated index.js file. Its solved

untrulynoxiusmj commented 2 years ago

There's no need to find user using email and finding _id from that req.user will also have _id field

abhi9-hash commented 2 years ago

There's no need to find user using email and finding _id from that req.user will also have _id field

got it

opencode-bot commented 2 years ago

Hey @abhi9-hash

Your PR has been merged :partying_face::partying_face: and you have earned 20 points.

Thanks for contributing to OpenCode ✨✨!