Skip to content

High performance self-hosted photo and video management solution.

fix(server): album sorted incorrectly (#1901)

Alex5fd249677482
diff --git a/server/apps/immich/src/api-v1/album/album-repository.ts b/server/apps/immich/src/api-v1/album/album-repository.ts
index e0cf3d6281..c76691b6b4 100644
--- a/server/apps/immich/src/api-v1/album/album-repository.ts
+++ b/server/apps/immich/src/api-v1/album/album-repository.ts
@@ -80,7 +80,7 @@ export class AlbumRepository implements IAlbumRepository {
const queryProperties: FindManyOptions<AlbumEntity> = {
relations: { sharedUsers: true, assets: true, sharedLinks: true, owner: true },
select: { assets: { id: true } },
- order: { assets: { fileCreatedAt: 'ASC' }, createdAt: 'ASC' },
+ order: { createdAt: 'DESC' },
};
let albumsQuery: Promise<AlbumEntity[]>;