A
A
Alexander Ivanov2020-05-05 00:28:15
Mongoose
Alexander Ivanov, 2020-05-05 00:28:15

Why is the document not being removed from Mongo?

I try to delete the document, I send data from the react to the node, everything comes out intact. But when saving, in the callback of the function, it displays a message in the data (not an error). There are no errors in the request and, ideally, the deletion should have worked.
"Object {n: 0, ok: 1, deletedCount: 0}"
5eb088e44a19e035006382.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2020-05-05
@alexsteadfast

Solved the problem:
When working with mongo, locally, you can request data from the database on the server. But you cannot delete data from it. Posted the code on a server, everything works, records are deleted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question