refactor: Phase 1 code cleanup - constants, logging, and repository organization
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user