diff --git a/module.json b/module.json index c5e892e..4377ebe 100644 --- a/module.json +++ b/module.json @@ -6,7 +6,7 @@ "authors": [ { "name": "Robin Riis" } ], - "version": "0.1.24", + "version": "0.1.25", "socket": true, "minimumCoreVersion": 10, "compatibility": { diff --git a/scripts/puckoapi/puckoapi.js b/scripts/puckoapi/puckoapi.js index 48ff2b7..3c5c2d7 100644 --- a/scripts/puckoapi/puckoapi.js +++ b/scripts/puckoapi/puckoapi.js @@ -7,7 +7,7 @@ export class PuckoPruttApi { } async _fetch_json(url) { - const response = await fetch(url); + const response = await fetch(this.apiUrl + url); if (!response.ok) { return -1; } @@ -16,6 +16,6 @@ export class PuckoPruttApi { } async dagens_lunch(spider) { - return await this._fetch_json(this.apiUrl + "/spiders/dagens_lunch/" + spider + "/?format=json"); + return await this._fetch_json("/spiders/dagens_lunch/" + spider + "/?format=json"); } } \ No newline at end of file diff --git a/scripts/puckochat/commands.js b/scripts/puckochat/commands.js index 0a5842f..360b295 100644 --- a/scripts/puckochat/commands.js +++ b/scripts/puckochat/commands.js @@ -9,6 +9,7 @@ async function dagens(user, message) { } let today = new Date().getDay(); let ret = ""; + console.log(week); switch(today) { case 1: ret = week["monday"];