fix(routes): complete post-refactor dependency wiring cleanup

This commit is contained in:
Krystie
2026-05-02 20:43:39 -07:00
parent 4eebb3ce7a
commit 0c658a26a8
32 changed files with 495 additions and 396 deletions

View File

@@ -10,12 +10,18 @@ const { APP_PORTS } = require('../../constants');
* @param {Function} deps.errorResponse - Error response helper
* @param {Object} deps.log - Logger instance
* @param {Object} deps.helpers - Arr helpers module
* @param {Object} deps.servicesStateManager - Services state manager
* @param {Object} deps.notification - Notification helper
* @returns {express.Router}
*/
module.exports = function(ctx) {
const { credentialManager, fetchT, asyncHandler, errorResponse, log, helpers } = ctx;
module.exports = function({ credentialManager, servicesStateManager, fetchT, asyncHandler, errorResponse: _errorResponse, log: _log, helpers, notification }) {
const router = express.Router();
const ctx = {
servicesStateManager,
notification
};
// Smart Connect: Unified orchestration endpoint
router.post('/arr/smart-connect', asyncHandler(async (req, res) => {
const { services: inputServices, configurePlex, configureProwlarr, configureSeerr, saveCredentials } = req.body;