diff --git a/src/Components/Api/Api.tsx b/src/Components/Api/Api.tsx index 4a71e0e..52d06c3 100644 --- a/src/Components/Api/Api.tsx +++ b/src/Components/Api/Api.tsx @@ -1,9 +1,11 @@ import axios from "axios"; -import { get } from "http"; export function GetNotes() { - return fetch("http://localhost:8000/api/v1/notes/").then((res) => { - console.log(res); - return res.json(); + return axios.get("http://localhost:8000/api/v1/notes/").then((res) => { + return res.data; }); + /*return fetch("http://localhost:8000/api/v1/notes/").then((res) => { + console.log(res.body); + return res.json(); + });*/ }