Skip to content

Commit

Permalink
Update forecast.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kstt27 authored Dec 26, 2021
1 parent 7657907 commit 90bfe94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/forecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const key = "Yo5CvJWAsJUdmCs2rhwvHyfy58oGNXjM";

// Get weather info
const getWeather = async (datakey) => {
const base = "http://dataservice.accuweather.com/currentconditions/v1/";
const base = "https://dataservice.accuweather.com/currentconditions/v1/";
const query = `${datakey}?apikey=${key}`;
// await this promise until the result is out
const response = await fetch(base + query);
Expand All @@ -16,7 +16,7 @@ const getWeather = async (datakey) => {

// Get city info
const getCity = async (city) => {
const base = "http://dataservice.accuweather.com/locations/v1/cities/search";
const base = "https://dataservice.accuweather.com/locations/v1/cities/search";
const query = `?apikey=${key}&q=${city}`;

const response = await fetch(base + query);
Expand Down

0 comments on commit 90bfe94

Please sign in to comment.