Fixed docker issue temporarily
This commit is contained in:
@@ -4,7 +4,7 @@ const weatherMapsUrl = 'https://api.rainviewer.com/public/weather-maps.json';
|
||||
|
||||
async function getWeatherMaps(): Promise<WeatherMaps | undefined> {
|
||||
const response = await fetch(`${weatherMapsUrl}`, {
|
||||
method: 'GET',
|
||||
method: 'GET'
|
||||
});
|
||||
if (response?.status === 200) {
|
||||
return response.json();
|
||||
@@ -18,16 +18,16 @@ export async function getWeatherMapUrl(): Promise<string | null> {
|
||||
if (weatherMaps != undefined) {
|
||||
let url = weatherMaps.host;
|
||||
// url = 'https://cdn.rainviewer.com';
|
||||
let latest = "";
|
||||
let latest = '';
|
||||
if (weatherMaps.radar.past.length > 0) {
|
||||
latest = weatherMaps.radar.past[weatherMaps.radar.past.length - 1].path;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
url += latest + "/256/{z}/{x}/{y}/2/1_1.png";
|
||||
url += latest + '/256/{z}/{x}/{y}/2/1_1.png';
|
||||
// url += latest + "/256/{z}/{x}/{y}/255/1_1_1_0.webp";
|
||||
return url;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ export interface SatelliteObject {
|
||||
export interface FrameObject {
|
||||
time: number;
|
||||
path: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user