Make version number dynamic in server.js template
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 <noreply@anthropic.com>
This commit is contained in:
parent
e7076859b7
commit
16a7c0c0b6
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user