fix(routes): complete post-refactor dependency wiring cleanup
This commit is contained in:
@@ -2,9 +2,12 @@ const express = require('express');
|
||||
const { DOCKER } = require('../../constants');
|
||||
const { NotFoundError } = require('../../errors');
|
||||
|
||||
module.exports = function(ctx) {
|
||||
const { servicesStateManager, asyncHandler, log } = ctx;
|
||||
module.exports = function({ servicesStateManager, asyncHandler, log, docker, notification, buildDomain, caddy }) {
|
||||
const router = express.Router();
|
||||
|
||||
// Ctx shim for backward compatibility
|
||||
const ctx = { docker, notification, buildDomain, caddy };
|
||||
|
||||
/**
|
||||
* Recipes management routes factory
|
||||
* @param {Object} deps - Explicit dependencies
|
||||
@@ -303,7 +306,7 @@ module.exports = function(ctx) {
|
||||
*/
|
||||
async function removeCaddyBlock(subdomain) {
|
||||
const domain = ctx.buildDomain(subdomain);
|
||||
let content = await ctx.caddy.read();
|
||||
const content = await ctx.caddy.read();
|
||||
|
||||
// Find and remove the block for this domain
|
||||
const escapedDomain = domain.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
|
||||
Reference in New Issue
Block a user