diff --git a/iframe.html b/iframe.html index 3e60b91..9ee0f45 100644 --- a/iframe.html +++ b/iframe.html @@ -9,13 +9,13 @@ {}); + fetch(`${process.env.REACT_APP_API_URL}/vote?t=${up === true ? "u" : "d"}`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + name: name, + }), + }).catch(() => {}); } function App() { @@ -158,7 +153,7 @@ function App() { useEffect(() => { const fetchProducts = () => - fetch("https://devdash.ex.umbach.dev/api/v1/productpipeline") + fetch(process.env.REACT_APP_API_URL) .then((res) => res.json()) .then((data) => { setProducts(data);