refactor: Phase 1 code cleanup - constants, logging, and repository organization

This commit is contained in:
2026-03-28 18:54:39 -07:00
parent f1b0ac43d0
commit 6c3848102b
24 changed files with 17078 additions and 50 deletions

View File

@@ -6,7 +6,7 @@ module.exports = function(ctx, helpers) {
// Store arr service credentials
router.post('/arr/credentials', ctx.asyncHandler(async (req, res) => {
const { service, apiKey, url, seedboxBaseUrl } = req.body;
const { service, apiKey, url, seedboxBaseUrl, qualityProfileId, qualityProfileName } = req.body;
if (!service || !apiKey) {
return ctx.errorResponse(res, 400, 'Service name and API key required');
@@ -65,6 +65,12 @@ module.exports = function(ctx, helpers) {
}
}
// Store quality profile preference if provided
if (qualityProfileId) {
metadata.qualityProfileId = qualityProfileId;
metadata.qualityProfileName = qualityProfileName || null;
}
// Store the credential
const stored = await ctx.credentialManager.store(credKey, apiKey, metadata);
if (!stored) {