Use direct call for geojson files
Deploy Spot / deploy (push) Successful in 16s

This commit is contained in:
2026-08-10 23:14:21 +02:00
parent dcd3e7339b
commit d6c897beeb
9 changed files with 62 additions and 30 deletions
+10
View File
@@ -14,6 +14,16 @@ export default class Api {
return response.data;
}
async getAsset(sAssetPath) {
const oRequest = await fetch(sAssetPath, {headers: {'Accept': 'application/geo+json'}});
if(!oRequest.ok) {
throw new Error('Error HTTP ' + oRequest.status + ': ' + oRequest.statusText);
}
return oRequest.json();
}
async post(sAction, asParams = {}) {
const response = await this.request(sAction, asParams, 'POST');
return response.data;