Re-enable cache server

This commit is contained in:
Pieter Vander Vennet 2024-04-30 23:14:57 +02:00
parent 7d313fedf8
commit 2526bc15bf
5 changed files with 13 additions and 5 deletions

View file

@ -1042,7 +1042,14 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
Utils._download_cache.set(url, { promise, timestamp: new Date().getTime() })
return await promise
}
public static async downloadJson(
url: string,
headers?: Record<string, string>
): Promise<object | []>
public static async downloadJson<T>(
url: string,
headers?: Record<string, string>
): Promise<T>
public static async downloadJson(
url: string,
headers?: Record<string, string>