From fda22c83b9907692fe02071fbb0e9788b85cdae5 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Thu, 26 Jun 2025 07:12:56 +0530 Subject: [PATCH] fix: sync stream album assets type order (#19540) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- server/src/services/sync.service.ts | 2 +- server/test/medium/specs/sync/sync-types.spec.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/services/sync.service.ts b/server/src/services/sync.service.ts index 8293ae33b9..47189cb033 100644 --- a/server/src/services/sync.service.ts +++ b/server/src/services/sync.service.ts @@ -58,9 +58,9 @@ export const SYNC_TYPES_ORDER = [ SyncRequestType.PartnersV1, SyncRequestType.AssetsV1, SyncRequestType.PartnerAssetsV1, + SyncRequestType.AlbumAssetsV1, SyncRequestType.AlbumsV1, SyncRequestType.AlbumUsersV1, - SyncRequestType.AlbumAssetsV1, SyncRequestType.AlbumToAssetsV1, SyncRequestType.AssetExifsV1, SyncRequestType.AlbumAssetExifsV1, diff --git a/server/test/medium/specs/sync/sync-types.spec.ts b/server/test/medium/specs/sync/sync-types.spec.ts index 1af5a68fd6..737db068ba 100644 --- a/server/test/medium/specs/sync/sync-types.spec.ts +++ b/server/test/medium/specs/sync/sync-types.spec.ts @@ -9,4 +9,11 @@ describe('types', () => { expect(SYNC_TYPES_ORDER.length).toBe(Object.keys(SyncRequestType).length); }); + + it('should ensure album follows albums assets', () => { + const albumIndex = SYNC_TYPES_ORDER.indexOf(SyncRequestType.AlbumsV1); + const albumAssetsIndex = SYNC_TYPES_ORDER.indexOf(SyncRequestType.AlbumAssetsV1); + + expect(albumIndex).toBeGreaterThan(albumAssetsIndex); + }); });