fix: resolve ctx naming conflict in arr/config.js, add pylon to known config keys
- Remove redundant ctx shim that conflicted with function parameter - Use destructured notification/safeErrorMessage directly - Add pylon, customLogoDark, customLogoLight to known config keys Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,11 +21,6 @@ module.exports = function(ctx) {
|
||||
const { credentialManager, servicesStateManager, docker, fetchT, asyncHandler, errorResponse, log, helpers, notification, safeErrorMessage } = ctx;
|
||||
const router = express.Router();
|
||||
|
||||
// Ctx shim for backward compatibility
|
||||
const ctx = {
|
||||
notification,
|
||||
safeErrorMessage
|
||||
};
|
||||
|
||||
// Auto-configure Overseerr with detected services
|
||||
router.post('/arr/configure-overseerr', asyncHandler(async (req, res) => {
|
||||
@@ -282,7 +277,7 @@ module.exports = function(ctx) {
|
||||
} else if (error.name === 'AbortError' || error.message?.includes('timeout')) {
|
||||
return errorResponse(res, 504, 'Connection timeout');
|
||||
}
|
||||
return errorResponse(res, 500, ctx.safeErrorMessage(error));
|
||||
return errorResponse(res, 500, safeErrorMessage(error));
|
||||
}
|
||||
}, 'arr-test-connection'));
|
||||
|
||||
@@ -484,7 +479,7 @@ module.exports = function(ctx) {
|
||||
|
||||
// Send notification
|
||||
if (anyConfigured) {
|
||||
ctx.notification.send(
|
||||
notification.send(
|
||||
'deploymentSuccess',
|
||||
'Arr Stack Auto-Connected',
|
||||
`Overseerr configured: ${Object.entries(configResults).filter(([k,v]) => v === 'configured').map(([k]) => k).join(', ')}`,
|
||||
|
||||
Reference in New Issue
Block a user