updated to version 0.1.30

This commit is contained in:
KungKurt 2025-02-23 22:58:48 +01:00
parent 14560bc86d
commit d8461356b9
2 changed files with 7 additions and 3 deletions

View File

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

View File

@ -7,10 +7,14 @@ export class PuckoPruttApi {
} }
async _fetch_json(url) { async _fetch_json(url) {
return await foundry.utils.fetchJsonWithTimeout(this.apiUrl + url) const response = await foundry.utils.fetchJsonWithTimeout(this.apiUrl + url);
const dagens = await response.json();
return dagens;
} }
dagens_lunch(spider) { dagens_lunch(spider) {
return this._fetch_json("/spiders/dagens_lunch/" + spider + "/?format=json"); this._fetch_json("/spiders/dagens_lunch/" + spider + "/?format=json").then(dagens => {
return dagens;
});
} }
} }