1 Commits

Author SHA1 Message Date
znetsixe
0b857ef444 fix: align logging.enabled default to schema (true)
dashboardapiConfig.json declares `logging.enabled.default: true` but:
- dashboardapi.html defaulted `enableLog: false`
- src/specificClass.js `_buildConfig` used `Boolean(...)` which
  coerced undefined to false, overriding the schema default.

Aligned both to the schema: HTML default = true; _buildConfig now
uses `?? true` so an unspecified config follows the schema.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 15:59:19 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
color: '#4f8582',
defaults: {
name: { value: '' },
enableLog: { value: false },
enableLog: { value: true },
logLevel: { value: 'info' },
protocol: { value: 'http' },

View File

@@ -55,7 +55,7 @@ class DashboardApi {
general: {
name: config?.general?.name || 'dashboardapi',
logging: {
enabled: Boolean(config?.general?.logging?.enabled),
enabled: config?.general?.logging?.enabled ?? true,
logLevel: config?.general?.logging?.logLevel || 'info',
},
},