backups: make id, provider a backend specific setting

the backend can stash whatever values it wants in the config.
just like the DNS backends, we make verifyConfig return a sanitized config.
added benefit is that extra user fields (via API) are also not dumped into the db.
This commit is contained in:
Girish Ramakrishnan
2025-08-01 18:55:04 +02:00
parent 9dfe6242b9
commit 53e9925880
7 changed files with 165 additions and 134 deletions
+7 -3
View File
@@ -17,7 +17,7 @@ exports = module.exports = {
teardown,
cleanup,
testConfig,
verifyConfig,
removePrivateFields,
injectPrivateFields
};
@@ -103,8 +103,12 @@ async function cleanup(apiConfig, progressCallback) {
assert.strictEqual(typeof progressCallback, 'function');
}
async function testConfig(apiConfig) {
assert.strictEqual(typeof apiConfig, 'object');
async function verifyConfig({ id, provider, config }) {
assert.strictEqual(typeof id, 'string');
assert.strictEqual(typeof provider, 'string');
assert.strictEqual(typeof config, 'object');
return {};
}
async function setup(apiConfig) {