fix(routes): complete post-refactor dependency wiring cleanup
This commit is contained in:
@@ -36,8 +36,8 @@ const { validateURL } = require('../input-validator');
|
||||
|
||||
// Optional modules
|
||||
let dockerMaintenance, logDigest;
|
||||
try { dockerMaintenance = require('../docker-maintenance'); } catch (_) {}
|
||||
try { logDigest = require('../log-digest'); } catch (_) {}
|
||||
try { dockerMaintenance = require('../docker-maintenance'); } catch (_) { /* optional module */ }
|
||||
try { logDigest = require('../log-digest'); } catch (_) { /* optional module */ }
|
||||
|
||||
// Templates
|
||||
const { APP_TEMPLATES, TEMPLATE_CATEGORIES, DIFFICULTY_LEVELS } = require('../app-templates');
|
||||
@@ -104,8 +104,8 @@ async function createApp() {
|
||||
log.warn('server', 'CA cert not found — HTTPS calls may fail', { path: CA_CERT_PATH });
|
||||
}
|
||||
|
||||
// TOTP configuration (defaults, overridden by loadTotpConfig below)
|
||||
let totpConfig = {
|
||||
// TOTP configuration
|
||||
const totpConfig = {
|
||||
enabled: false,
|
||||
sessionDuration: 'never',
|
||||
isSetUp: false
|
||||
@@ -124,7 +124,7 @@ async function createApp() {
|
||||
}
|
||||
|
||||
// Tailscale configuration
|
||||
let tailscaleConfig = {
|
||||
const tailscaleConfig = {
|
||||
enabled: false,
|
||||
requireAuth: false,
|
||||
allowedTailnet: null,
|
||||
@@ -137,7 +137,7 @@ async function createApp() {
|
||||
|
||||
// Helper functions needed by middleware
|
||||
function isValidContainerId(id) {
|
||||
const CONTAINER_ID_RE = /^[a-zA-Z0-9][a-zA-Z0-9_.\-]{0,127}$/;
|
||||
const CONTAINER_ID_RE = /^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$/;
|
||||
return typeof id === 'string' && CONTAINER_ID_RE.test(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user