#api route breaking
1 messages ยท Page 1 of 1 (latest)
Oh thanks
Delete those and I think you are not getting the data in you request body, log them to check!
By those I meant the SS, share them inthis thread!
Share the complete error
So what is error now!?
ReferenceError: ObjectId is not defined
Oh sorry, you wrote that you fixed it that's why!
Hey! I've some exposure to this give me some time. This is not the right way to solve it.
take your time bro ๐
How are you passing the I'd in the objectId
62dbf............... Why it looks like hard-coded!?
First you must send the I'd via req body and then used the following approach.
import { ObjectId } from "mongodb"
let id = ObjectId(req.body._id)
Then pass this to your function
Okay cool no issues
Yes, debug more on the update method you are calling. Let me know if you need more help after trying!
i never used debugging i will try
me trying to do debug for 30 minutes but still confusing
I can get back to you in evening!
just reached home bro, If you can hop on a meet call tomorrow after 10, we can debug it together!
Yep, was busy in festivities!
Take ur time bro ๐
u here :))
Yeah, any progress!?
Yeah, great!
heyy
i wana use populate method in mongodb to get the author name from other sechmas ๐
i finished posting comments and getting it , and when getting it i need to convert my author id to author name
this is a problem everyone is experience ?
i solved it
now trying to save a profile picture for each user
Well done bud !