Angular MongoDB Change Response Data Id But Still Get Request Data Id
I have an issue with my request and response. I am handling issues when the customer wants to add more than one of the same item with a different size.
What I first do is check if the Id exist by doing a count on and a if statement. If exist I create a a new object id using ({“_id”: ObjectId()}) with no parameters. It all works as expected same object insert but with new id. What I do next is send a different response and it shows the response with the different Id, but when I try to do an update on the response Id it updates the id of the request.