Use https
This commit is contained in:
@@ -9,12 +9,10 @@ import {
|
|||||||
import { path } from "ramda";
|
import { path } from "ramda";
|
||||||
|
|
||||||
const fetchWeekForecastData = async function (dateTime, cb) {
|
const fetchWeekForecastData = async function (dateTime, cb) {
|
||||||
const formattedDate = formatDate(dateTime);
|
|
||||||
|
|
||||||
const forecastRequests = Array.from({ length: 7 }).map((_, index) => {
|
const forecastRequests = Array.from({ length: 7 }).map((_, index) => {
|
||||||
const date = addDays(dateTime, index);
|
const date = addDays(dateTime, index);
|
||||||
const formattedDate = format(date, "yyyy-MM-d");
|
const formattedDate = format(date, "yyyy-MM-d");
|
||||||
const url = `http://api.weatherapi.com/v1/future.json?key=bfca7632f8dc4253859120435242301&q=Vienna&dt=${formattedDate}`;
|
const url = `https://api.weatherapi.com/v1/future.json?key=bfca7632f8dc4253859120435242301&q=Vienna&dt=${formattedDate}`;
|
||||||
const dataPromise = fetch(url).then((x) => x.json());
|
const dataPromise = fetch(url).then((x) => x.json());
|
||||||
|
|
||||||
return dataPromise;
|
return dataPromise;
|
||||||
|
|||||||
Reference in New Issue
Block a user