From 98a87798feb893a16ffe2985c6d379fd25ef927b Mon Sep 17 00:00:00 2001 From: Tobias Bocanegra Date: Wed, 26 Nov 2025 14:57:26 +0100 Subject: [PATCH] fix: consistently use 'syncadmin' (no intercaps) --- src/storage/object/copy.js | 2 +- test/storage/object/copy.test.js | 8 ++++---- test/storage/utils/object.test.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/storage/object/copy.js b/src/storage/object/copy.js index b3038619..c72131b6 100644 --- a/src/storage/object/copy.js +++ b/src/storage/object/copy.js @@ -113,7 +113,7 @@ export const copyFile = async (config, env, daCtx, sourceKey, details, isRename) } finally { if (Key.endsWith('.html')) { // Reset the collab cached state for the copied object - await invalidateCollab('syncAdmin', `${daCtx.origin}/source/${daCtx.org}/${Key}`, env); + await invalidateCollab('syncadmin', `${daCtx.origin}/source/${daCtx.org}/${Key}`, env); } } }; diff --git a/test/storage/object/copy.test.js b/test/storage/object/copy.test.js index 2c5fca40..f787421c 100644 --- a/test/storage/object/copy.test.js +++ b/test/storage/object/copy.test.js @@ -229,7 +229,7 @@ describe('Object copy', () => { assert.strictEqual(1, collabcalls.length); assert.deepStrictEqual( collabcalls, - ['https://localhost/api/v1/syncAdmin?doc=somehost.sometld/source/foo/mydir/newdir/xyz.html'], + ['https://localhost/api/v1/syncadmin?doc=somehost.sometld/source/foo/mydir/newdir/xyz.html'], ); }); @@ -299,7 +299,7 @@ describe('Object copy', () => { assert.deepStrictEqual( collabcalls, - ['https://localhost/api/v1/syncAdmin?doc=http://localhost:3000/source/testorg/mydir/dir2/myfile.html'], + ['https://localhost/api/v1/syncadmin?doc=http://localhost:3000/source/testorg/mydir/dir2/myfile.html'], ); }); @@ -397,7 +397,7 @@ describe('Object copy', () => { assert.deepStrictEqual( collabCalled, - ['https://localhost/api/v1/syncAdmin?doc=https://blahblah:7890/source/myorg/mydst/abc/def.html'], + ['https://localhost/api/v1/syncadmin?doc=https://blahblah:7890/source/myorg/mydst/abc/def.html'], ); }); @@ -522,7 +522,7 @@ describe('Object copy', () => { assert.strictEqual(resp.$metadata.httpStatusCode, 404); assert.deepStrictEqual( collabCalled, - ['https://localhost/api/v1/syncAdmin?doc=http://qqq/source/qqqorg/qqqdst/abc/def.html'], + ['https://localhost/api/v1/syncadmin?doc=http://qqq/source/qqqorg/qqqdst/abc/def.html'], ); }); }); diff --git a/test/storage/utils/object.test.js b/test/storage/utils/object.test.js index 9d6f3adc..fe79ba88 100644 --- a/test/storage/utils/object.test.js +++ b/test/storage/utils/object.test.js @@ -31,17 +31,17 @@ describe('Storage Object Utils tests', () => { const { called, env } = setupEnv(); assert.strictEqual(called.length, 0, 'precondition'); - await invalidateCollab('syncAdmin', 'https://admin.da.live/source/a/b/c.html', env); + await invalidateCollab('syncadmin', 'https://admin.da.live/source/a/b/c.html', env); assert.strictEqual(called.length, 1); - assert.strictEqual(called[0], 'https://localhost/api/v1/syncAdmin?doc=https://admin.da.live/source/a/b/c.html'); + assert.strictEqual(called[0], 'https://localhost/api/v1/syncadmin?doc=https://admin.da.live/source/a/b/c.html'); }); it('Should not invalidate non-html documents', async () => { const { called, env } = setupEnv(); assert.strictEqual(called.length, 0, 'precondition'); - await invalidateCollab('syncAdmin', 'https://admin.da.live/source/a/b/c.jpg', env); - await invalidateCollab('syncAdmin', 'https://admin.da.live/source/a/b/c/d', env); + await invalidateCollab('syncadmin', 'https://admin.da.live/source/a/b/c.jpg', env); + await invalidateCollab('syncadmin', 'https://admin.da.live/source/a/b/c/d', env); assert.strictEqual(called.length, 0, 'should not have invalidated anything'); }); });