updated to version 0.1.26

This commit is contained in:
KungKurt 2025-02-23 22:41:02 +01:00
parent 5d583ed6d8
commit 053a2e9ec9
2 changed files with 8 additions and 7 deletions

View File

@ -6,7 +6,7 @@
"authors": [
{ "name": "Robin Riis" }
],
"version": "0.1.25",
"version": "0.1.26",
"socket": true,
"minimumCoreVersion": 10,
"compatibility": {

View File

@ -7,12 +7,13 @@ export class PuckoPruttApi {
}
async _fetch_json(url) {
const response = await fetch(this.apiUrl + url);
if (!response.ok) {
return -1;
}
const json = await response.json();
return json;
ret = "Could not fetch "+url
const response = await fetch(this.apiUrl + url).then(
response => response.json()
).then(data => ret = data).catch(
error => console.error("Error: ", error)
);
return ret
}
async dagens_lunch(spider) {