fix(routes): restore ctx access in 15 route files broken by Phase 2.1 refactor
The modular refactor changed function signatures to destructured deps but left internal ctx.* references intact, causing "ctx is not defined" errors on /api/config, /api/logo, and many other endpoints. Also implements loadTotpConfig and saveTotpConfig which were left as stubs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,8 @@ const platformPaths = require('../../platform-paths');
|
||||
* @param {Object} deps.log - Logger instance
|
||||
* @returns {Object} Helper functions
|
||||
*/
|
||||
module.exports = function({ docker, caddy, credentialManager, servicesStateManager, fetchT, log }) {
|
||||
module.exports = function(ctx) {
|
||||
const { docker, caddy, credentialManager, servicesStateManager, fetchT, log } = ctx;
|
||||
|
||||
async function checkPortConflicts(ports, excludeContainerName = null) {
|
||||
const conflicts = [];
|
||||
|
||||
Reference in New Issue
Block a user