From 47c6f35c7e5a7f1c99dbf33c1499bc761a440dd6 Mon Sep 17 00:00:00 2001 From: Andrehlb Date: Tue, 19 Dec 2023 07:34:18 -0300 Subject: [PATCH] Update script-weatherNode.js to fetch and display weather for default city on page load and for user-input city on button click. --- weather-node/public/script-weatherNode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weather-node/public/script-weatherNode.js b/weather-node/public/script-weatherNode.js index 5af4e40..b85ef4c 100644 --- a/weather-node/public/script-weatherNode.js +++ b/weather-node/public/script-weatherNode.js @@ -1,5 +1,5 @@ function fetchWeather(city) { - fetch('/weather?city=${city}') + fetch(`/weather?city=${city}`) .then(response => response.json()) .then(data => { const weatherDiv = document.getElementById('Weather');