Update AppContext.js
updating API endpoint
This commit is contained in:
@@ -332,7 +332,7 @@ export function AppContextProvider({ children }) {
|
|||||||
|
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
`https://data.climacell.co/v4/timelines?location=${latitude}%2C${longitude}&fields=${fields}×teps=1h&apikey=${weatherApiKey}&endTime=${endTime}`
|
`https://api.tomorrow.io/v4/timelines?location=${latitude}%2C${longitude}&fields=${fields}×teps=1h&apikey=${weatherApiKey}&endTime=${endTime}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
@@ -389,7 +389,7 @@ export function AppContextProvider({ children }) {
|
|||||||
}
|
}
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
`https://data.climacell.co/v4/timelines?location=${latitude}%2C${longitude}&fields=${fields}×teps=1d&apikey=${weatherApiKey}&endTime=${endTime}`
|
`https://api.tomorrow.io/v4/timelines?location=${latitude}%2C${longitude}&fields=${fields}×teps=1d&apikey=${weatherApiKey}&endTime=${endTime}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
@@ -479,7 +479,7 @@ export function AppContextProvider({ children }) {
|
|||||||
|
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
`https://data.climacell.co/v4/timelines?location=${latitude}%2C${longitude}&fields=${fields}×teps=current&apikey=${weatherApiKey}`
|
`https://api.tomorrow.io/v4/timelines?location=${latitude}%2C${longitude}&fields=${fields}×teps=current&apikey=${weatherApiKey}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user