From 9bcde89c317043db8ba6e8058665552fd31ec0f6 Mon Sep 17 00:00:00 2001 From: KungKurt Date: Sun, 23 Feb 2025 14:49:29 +0100 Subject: [PATCH] updated to version 0.1.14 --- module.json | 2 +- scripts/main.js | 8 ++++---- scripts/puckoapi/puckoapi.js | 10 ++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/module.json b/module.json index 6119ade..fe4bdba 100644 --- a/module.json +++ b/module.json @@ -6,7 +6,7 @@ "authors": [ { "name": "Robin Riis" } ], - "version": "0.1.13", + "version": "0.1.14", "socket": true, "minimumCoreVersion": 10, "compatibility": { diff --git a/scripts/main.js b/scripts/main.js index 62079d9..5e1f4f8 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -1,9 +1,9 @@ -import { puckoprutt } from "./puckoapi/puckoapi.js"; -import { puckocommand } from "./puckochat/commands.js"; +import PuckoPruttApi from "./puckoapi/puckoapi.js"; +import puckocommand from "./puckochat/commands.js"; -let pp = null; +let puckoprutt = null; Hooks.once("setup", async function() { - pp = puckoprutt; + puckoprutt = new PuckoPruttApi(); }); Hooks.on("init", async function() { diff --git a/scripts/puckoapi/puckoapi.js b/scripts/puckoapi/puckoapi.js index c1e89cf..8b9784d 100644 --- a/scripts/puckoapi/puckoapi.js +++ b/scripts/puckoapi/puckoapi.js @@ -1,4 +1,6 @@ -class PuckoPruttApi { + + +export default class PuckoPruttApi { constructor() { this.apiUrl = "https://api.puckoprutt.tech" this.schema = this.apiUrl + "/schema/" @@ -7,8 +9,4 @@ class PuckoPruttApi { dagens_lunch(spider) { return fetch(this.apiUrl + "/dagens_lunch/" + spider + "/", {method: "GET"}); } -} - -const puckoprutt = new PuckoPruttApi(); - -export default puckoprutt; \ No newline at end of file +} \ No newline at end of file