Axois delete request in mongodb

Hello FCC, you’re my only hope.
I am building a CRUD application where the creating is working just fine but the delete is giving me lots of trouble.

My objects in my database look like this

_id:6098bad48dbe04a1c75e99d1
pet:"Ninja"
breed:"Cat"
image:"https://ukmadcat.com/wp-content/uploads/2019/04/sleepy-cat.jpg"
desc:"Ninja loves boxes"
user:"Dylan"

And I am trying to send a request to delete based off of the _id property.

axios .delete(
 `https://us-west-2.aws.webhooks.mongodb-realm.com/api/client/v2.0/app/my_pets-dbdsd/service/pets/incoming_webhook/deletePet?id=${_id}`,
      )

So far this is giving me a 400 error, which I know means I didn’t do the request right.
Can anyone give me a quick tip? I’ve been stuck on this for a while, thank you.
Link to full code MERN-lesson/front at main · Imstupidpleasehelp/MERN-lesson · GitHub

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.