From 12b31dfc03b1e5089ddbd84f4d026f9b9b0b523d Mon Sep 17 00:00:00 2001 From: Rik Berkelder Date: Wed, 15 Jan 2025 22:10:23 +0100 Subject: [PATCH] use env var for MS base url --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index bb85f28..3e1ca53 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); +const mdBaseUrl = process.env.MD_BASE_URL; const apiId = parseInt(process.env.API_ID); const apiHash = process.env.API_HASH; const songPrefix = process.env.SONG_PREFIX || ""; @@ -27,7 +28,7 @@ try { } async function getCurrentSong() { - return fetch('https://multi-scrobbler.riksolo.com/api/status').then((data) => { + return fetch(mdBaseUrl + '/api/status').then((data) => { return data.json(); }).then(data => { const players = [];