Next.js Discord

Discord Forum

Api request error

Unanswered
Morelet’s Crocodile posted this in #help-forum
Open in Discord
Morelet’s CrocodileOP
I have error in request
When I looked at A. Docs of the API, I found that the request is sent to the documentId, not to the id. I went to check on the package and found that it deletes the cart when you go to the documentId, but now I am trying to hold the cart in order to get the documentid from it and send a request. I sent it to it, but the cart when I printed it shows the id but from the object of the cart and the relationship between it and the product in the card And my debt is in Request http: DELETE /api/carts/undefined But it does not give me any documentid or username for adding the product if there is a user in the login operator Currently, I don't know how to access things like the API itself

1 Reply

Morelet’s CrocodileOP
Axios request