Allow any format for noop backup site

This commit is contained in:
Johannes Zellner
2025-09-21 18:06:32 +02:00
parent b4fa2d7ce6
commit 7df7fd635b
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -19,9 +19,12 @@ function api(format) {
throw new BoxError(BoxError.INTERNAL_ERROR, `Undefined format ${format}`);
}
function validateFormat(format) {
function validateFormat(provider, format) {
assert.strictEqual(typeof provider, 'string');
assert.strictEqual(typeof format, 'string');
if (provider === 'noop') return null;
if (format === 'tgz' || format == 'rsync') return null;
return new BoxError(BoxError.BAD_FIELD, 'Invalid backup format');