diff --git a/index.html b/index.html index b534314..9948837 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,14 @@ - - - - -

\ No newline at end of file + + + + + + Toddler Shop + + + + + + + + diff --git a/scripts/main.js b/scripts/main.js index dcf0000..11bf7d8 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -1,3 +1,5 @@ +var all_products + async function makeAPIRequest(request) { try { const response = await fetch(request); @@ -10,7 +12,7 @@ async function makeAPIRequest(request) { async function loadProducts() { const loadProductRequest = new Request("http://127.0.0.1:8000/products") - const result = await makeAPIRequest(loadProductRequest) - console.log(result) + all_products = await makeAPIRequest(loadProductRequest) + console.log("Loaded products:", all_products) } \ No newline at end of file