From 16a7c0c0b6b063d15b5d9114b7f8b64aa929675b Mon Sep 17 00:00:00 2001 From: MasterDraco Date: Wed, 5 Mar 2025 10:28:36 +0000 Subject: [PATCH] Make version number dynamic in server.js template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of hardcoding the version number in the server.js template, this change reads the version dynamically from package.json. This ensures that the dashboard always displays the correct version number without requiring manual updates to the template file. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- modules/file-creator-module.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/file-creator-module.sh b/modules/file-creator-module.sh index d987933..1df78d0 100644 --- a/modules/file-creator-module.sh +++ b/modules/file-creator-module.sh @@ -265,11 +265,15 @@ app.use(bodyParser.urlencoded({ extended: true, limit: '50mb' })); // API routes //============================== +// Get the version from package.json +const packageJson = require('./package.json'); +const appVersion = packageJson.version; + // Server status API app.get('/api/status', (req, res) => { res.json({ status: 'running', - version: '2.0.6', + version: appVersion, transmissionConnected: !!transmissionClient, postProcessorActive: postProcessor && postProcessor.processingIntervalId !== null, rssFeedManagerActive: rssFeedManager && rssFeedManager.updateIntervalId !== null,