You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-10 23:22:22 +02:00
refactor: remove album entity, update types (#17450)
This commit is contained in:
31
server/test/fixtures/shared-link.stub.ts
vendored
31
server/test/fixtures/shared-link.stub.ts
vendored
@@ -1,10 +1,9 @@
|
||||
import { UserAdmin } from 'src/database';
|
||||
import { AlbumResponseDto } from 'src/dtos/album.dto';
|
||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||
import { AssetResponseDto, MapAsset } from 'src/dtos/asset-response.dto';
|
||||
import { ExifResponseDto } from 'src/dtos/exif.dto';
|
||||
import { SharedLinkResponseDto } from 'src/dtos/shared-link.dto';
|
||||
import { mapUser } from 'src/dtos/user.dto';
|
||||
import { SharedLinkEntity } from 'src/entities/shared-link.entity';
|
||||
import { AssetOrder, AssetStatus, AssetType, SharedLinkType } from 'src/enum';
|
||||
import { assetStub } from 'test/fixtures/asset.stub';
|
||||
import { authStub } from 'test/fixtures/auth.stub';
|
||||
@@ -113,12 +112,12 @@ export const sharedLinkStub = {
|
||||
allowUpload: true,
|
||||
allowDownload: true,
|
||||
showExif: true,
|
||||
album: undefined,
|
||||
albumId: null,
|
||||
album: null,
|
||||
description: null,
|
||||
assets: [assetStub.image],
|
||||
password: 'password',
|
||||
albumId: null,
|
||||
} as SharedLinkEntity),
|
||||
}),
|
||||
valid: Object.freeze({
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
@@ -130,12 +129,12 @@ export const sharedLinkStub = {
|
||||
allowUpload: true,
|
||||
allowDownload: true,
|
||||
showExif: true,
|
||||
album: undefined,
|
||||
albumId: null,
|
||||
description: null,
|
||||
password: null,
|
||||
assets: [],
|
||||
} as SharedLinkEntity),
|
||||
assets: [] as MapAsset[],
|
||||
album: null,
|
||||
}),
|
||||
expired: Object.freeze({
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
@@ -150,9 +149,10 @@ export const sharedLinkStub = {
|
||||
description: null,
|
||||
password: null,
|
||||
albumId: null,
|
||||
assets: [],
|
||||
} as SharedLinkEntity),
|
||||
readonlyNoExif: Object.freeze<SharedLinkEntity>({
|
||||
assets: [] as MapAsset[],
|
||||
album: null,
|
||||
}),
|
||||
readonlyNoExif: Object.freeze({
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
key: sharedLinkBytes,
|
||||
@@ -168,6 +168,7 @@ export const sharedLinkStub = {
|
||||
albumId: 'album-123',
|
||||
album: {
|
||||
id: 'album-123',
|
||||
updateId: '42',
|
||||
ownerId: authStub.admin.user.id,
|
||||
owner: userStub.admin,
|
||||
albumName: 'Test Album',
|
||||
@@ -239,17 +240,22 @@ export const sharedLinkStub = {
|
||||
colorspace: 'sRGB',
|
||||
autoStackId: null,
|
||||
rating: 3,
|
||||
updatedAt: today,
|
||||
updateId: '42',
|
||||
},
|
||||
sharedLinks: [],
|
||||
faces: [],
|
||||
sidecarPath: null,
|
||||
deletedAt: null,
|
||||
duplicateId: null,
|
||||
updateId: '42',
|
||||
libraryId: null,
|
||||
stackId: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
passwordRequired: Object.freeze<SharedLinkEntity>({
|
||||
passwordRequired: Object.freeze({
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
key: sharedLinkBytes,
|
||||
@@ -263,6 +269,7 @@ export const sharedLinkStub = {
|
||||
password: 'password',
|
||||
assets: [],
|
||||
albumId: null,
|
||||
album: null,
|
||||
}),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user