Answer the question
In order to leave comments, you need to log in
Node.js, MongoDB, why can't I make a request?
The search for comments is performed by the id of the post sent by ajax, but for some reason returns an empty array:
Although it is clear that "1" is stored in the value of post_id
This is what happens when I replace it with a specific value: So what
's the problem, dear sages?
PS Thanks in advance for your replies!
Answer the question
In order to leave comments, you need to log in
If req.body.id came as a string, then it will not find anything, because In monga, data is stored in BSON, which is strongly typed. Do this:
PS screenshot code is a mockery of people who want to help you :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question