mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 17:25:00 +03:00
fix(server): album perf query (#5232)
* Revert "fix: album performances (#5224)" This reverts commitc438e17954. * Revert "fix: album sorting options (#5127)" This reverts commit725f30c494.
This commit is contained in:
30
server/test/fixtures/album.stub.ts
vendored
30
server/test/fixtures/album.stub.ts
vendored
@@ -19,9 +19,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
assetCount: 0,
|
||||
}),
|
||||
sharedWithUser: Object.freeze<AlbumEntity>({
|
||||
id: 'album-2',
|
||||
@@ -38,9 +35,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [userStub.user1],
|
||||
isActivityEnabled: true,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
assetCount: 0,
|
||||
}),
|
||||
sharedWithMultiple: Object.freeze<AlbumEntity>({
|
||||
id: 'album-3',
|
||||
@@ -57,9 +51,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [userStub.user1, userStub.user2],
|
||||
isActivityEnabled: true,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
assetCount: 0,
|
||||
}),
|
||||
sharedWithAdmin: Object.freeze<AlbumEntity>({
|
||||
id: 'album-3',
|
||||
@@ -76,9 +67,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [userStub.admin],
|
||||
isActivityEnabled: true,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
assetCount: 0,
|
||||
}),
|
||||
oneAsset: Object.freeze<AlbumEntity>({
|
||||
id: 'album-4',
|
||||
@@ -95,9 +83,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: assetStub.image.fileCreatedAt,
|
||||
endDate: assetStub.image.fileCreatedAt,
|
||||
assetCount: 1,
|
||||
}),
|
||||
twoAssets: Object.freeze<AlbumEntity>({
|
||||
id: 'album-4a',
|
||||
@@ -114,9 +99,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: assetStub.withLocation.fileCreatedAt,
|
||||
endDate: assetStub.image.fileCreatedAt,
|
||||
assetCount: 2,
|
||||
}),
|
||||
emptyWithInvalidThumbnail: Object.freeze<AlbumEntity>({
|
||||
id: 'album-5',
|
||||
@@ -133,9 +115,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
assetCount: 0,
|
||||
}),
|
||||
emptyWithValidThumbnail: Object.freeze<AlbumEntity>({
|
||||
id: 'album-5',
|
||||
@@ -152,9 +131,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
assetCount: 0,
|
||||
}),
|
||||
oneAssetInvalidThumbnail: Object.freeze<AlbumEntity>({
|
||||
id: 'album-6',
|
||||
@@ -171,9 +147,6 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: assetStub.image.fileCreatedAt,
|
||||
endDate: assetStub.image.fileCreatedAt,
|
||||
assetCount: 1,
|
||||
}),
|
||||
oneAssetValidThumbnail: Object.freeze<AlbumEntity>({
|
||||
id: 'album-6',
|
||||
@@ -190,8 +163,5 @@ export const albumStub = {
|
||||
sharedLinks: [],
|
||||
sharedUsers: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: assetStub.image.fileCreatedAt,
|
||||
endDate: assetStub.image.fileCreatedAt,
|
||||
assetCount: 1,
|
||||
}),
|
||||
};
|
||||
|
||||
3
server/test/fixtures/shared-link.stub.ts
vendored
3
server/test/fixtures/shared-link.stub.ts
vendored
@@ -181,9 +181,6 @@ export const sharedLinkStub = {
|
||||
sharedUsers: [],
|
||||
sharedLinks: [],
|
||||
isActivityEnabled: true,
|
||||
startDate: today,
|
||||
endDate: today,
|
||||
assetCount: 1,
|
||||
assets: [
|
||||
{
|
||||
id: 'id_1',
|
||||
|
||||
@@ -5,6 +5,7 @@ export const newAlbumRepositoryMock = (): jest.Mocked<IAlbumRepository> => {
|
||||
getById: jest.fn(),
|
||||
getByIds: jest.fn(),
|
||||
getByAssetId: jest.fn(),
|
||||
getAssetCountForIds: jest.fn(),
|
||||
getInvalidThumbnail: jest.fn(),
|
||||
getOwned: jest.fn(),
|
||||
getShared: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user