diff --git a/module.json b/module.json index e6352cb..7999b00 100644 --- a/module.json +++ b/module.json @@ -6,7 +6,7 @@ "authors": [ { "name": "Robin Riis" } ], - "version": "0.1.18", + "version": "0.1.19", "socket": true, "minimumCoreVersion": 10, "compatibility": { diff --git a/scripts/puckoapi/puckoapi.js b/scripts/puckoapi/puckoapi.js index 2d80551..2d5b0d0 100644 --- a/scripts/puckoapi/puckoapi.js +++ b/scripts/puckoapi/puckoapi.js @@ -11,7 +11,8 @@ export class PuckoPruttApi { if (!response.ok) { return -1; } - return await response.json(); + const json = await response.json(); + return json; } dagens_lunch(spider) { diff --git a/scripts/puckochat/commands.js b/scripts/puckochat/commands.js index fcab14b..6b2c2ec 100644 --- a/scripts/puckochat/commands.js +++ b/scripts/puckochat/commands.js @@ -3,7 +3,7 @@ function test(user) { } function dagens(user, message) { - let week = game.modules.get("puckoprutt-foundry-module").api.dagens_lunch(message[1]); + let week = await game.modules.get("puckoprutt-foundry-module").api.dagens_lunch(message[1]); if (typeof week !== 'object') { return "could not fetch "+message[1]; }