Old delete fetch

PHOTO EMBED

Thu Mar 11 2021 22:47:56 GMT+0000 (UTC)

Saved by @stephanieraymos

  // useEffect for delete method //^----DELETE----
  useEffect(async() => {
    await fetch("http://143.110.225.28/api/v1/inventory/", {
      method: "DELETE",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        id: "",
      }),
    }).then((err) => console.log(err));
  }, []);
  // End of useEffect for delete
content_copyCOPY