Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Commit

Permalink
🛠 FIX url of getData was bad
Browse files Browse the repository at this point in the history
  • Loading branch information
Bihart committed Nov 23, 2021
1 parent 5f12651 commit 542fefe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/Graph/Graph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ function Graph(){
const getDataOfServer = async (e) => {
e.preventDefault();
const n_data = document.getElementById("n_data").value;
const host = (numberOfData) => `http:localhost:5000/api?n_data=${n_data}`
console.log(n_data);
const host = (numberOfData) => `http://localhost:5000/api?n_data=${n_data}`
const data = await fetch(host(n_data))
.then(res => res.json())


console.log(data);
setData({
sensors: [...data],
isFetch: true
Expand Down

0 comments on commit 542fefe

Please sign in to comment.