updated to version 0.1.25

This commit is contained in:
KungKurt 2025-02-23 22:30:23 +01:00
parent 4d45cc0e81
commit 5d583ed6d8
3 changed files with 4 additions and 3 deletions

View File

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

View File

@ -7,7 +7,7 @@ export class PuckoPruttApi {
} }
async _fetch_json(url) { async _fetch_json(url) {
const response = await fetch(url); const response = await fetch(this.apiUrl + url);
if (!response.ok) { if (!response.ok) {
return -1; return -1;
} }
@ -16,6 +16,6 @@ export class PuckoPruttApi {
} }
async dagens_lunch(spider) { 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");
} }
} }

View File

@ -9,6 +9,7 @@ async function dagens(user, message) {
} }
let today = new Date().getDay(); let today = new Date().getDay();
let ret = ""; let ret = "";
console.log(week);
switch(today) { switch(today) {
case 1: case 1:
ret = week["monday"]; ret = week["monday"];