Skip to content

Commit

Permalink
updating units for temperature as india
Browse files Browse the repository at this point in the history
  • Loading branch information
IM-Suryakant-Kumar committed Jun 14, 2023
1 parent 24059a7 commit 729769e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function getCurrentTime() {
setInterval(getCurrentTime, 1000)

navigator.geolocation.getCurrentPosition(position => {
fetch(`https://apis.scrimba.com/openweathermap/data/2.5/weather?lat=${position.coords.latitude}&lon=${position.coords.longitude}&units=imperial`)
fetch(`https://apis.scrimba.com/openweathermap/data/2.5/weather?lat=${position.coords.latitude}&lon=${position.coords.longitude}&units=metric`)
.then(res => {
if (!res.ok) {
throw Error("Weather data not available")
Expand Down

0 comments on commit 729769e

Please sign in to comment.