Debugging
This commit is contained in:
@@ -80,14 +80,13 @@ const DAILY_FIELDS = [
|
||||
export async function getOpenMeteo(lat, lon, start, end) {
|
||||
const startStr = start.toISOString().slice(0, 10)
|
||||
const endStr = end.toISOString().slice(0, 10)
|
||||
const url = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}` +
|
||||
`&daily=${DAILY_FIELDS}&timezone=auto&start_date=${startStr}&end_date=${endStr}`
|
||||
|
||||
console.log('[meteo] startStr :', startStr)
|
||||
console.log('[meteo] endStr :', endStr)
|
||||
console.log('[meteo] url :', url)
|
||||
|
||||
const url = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}` +
|
||||
`&daily=${DAILY_FIELDS}&timezone=auto&start_date=${startStr}&end_date=${endStr}`
|
||||
|
||||
const data = await cachedFetch(`daily_${lat}_${lon}_${startStr}_${endStr}`, url)
|
||||
|
||||
if (!data?.daily?.time) return []
|
||||
|
||||
Reference in New Issue
Block a user