fix(server): album perf query (#5232)

* Revert "fix: album performances (#5224)"

This reverts commit c438e17954.

* Revert "fix: album sorting options (#5127)"

This reverts commit 725f30c494.
This commit is contained in:
Alex
2023-11-21 10:07:49 -06:00
committed by GitHub
parent a13052e24c
commit f094ff2aa1
13 changed files with 108 additions and 184 deletions

View File

@@ -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,
}),
};

View File

@@ -181,9 +181,6 @@ export const sharedLinkStub = {
sharedUsers: [],
sharedLinks: [],
isActivityEnabled: true,
startDate: today,
endDate: today,
assetCount: 1,
assets: [
{
id: 'id_1',

View File

@@ -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(),