mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
feat: persistent memories (#8330)
* feat: persistent memories * refactor: use new add/remove asset utility
This commit is contained in:
30
server/test/fixtures/memory.stub.ts
vendored
Normal file
30
server/test/fixtures/memory.stub.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { MemoryEntity, MemoryType } from 'src/entities/memory.entity';
|
||||
import { assetStub } from 'test/fixtures/asset.stub';
|
||||
import { userStub } from 'test/fixtures/user.stub';
|
||||
|
||||
export const memoryStub = {
|
||||
empty: <MemoryEntity>{
|
||||
id: 'memoryEmpty',
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
memoryAt: new Date(2024),
|
||||
ownerId: userStub.admin.id,
|
||||
owner: userStub.admin,
|
||||
type: MemoryType.ON_THIS_DAY,
|
||||
data: { year: 2024 },
|
||||
isSaved: false,
|
||||
assets: [],
|
||||
},
|
||||
memory1: <MemoryEntity>{
|
||||
id: 'memory1',
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
memoryAt: new Date(2024),
|
||||
ownerId: userStub.admin.id,
|
||||
owner: userStub.admin,
|
||||
type: MemoryType.ON_THIS_DAY,
|
||||
data: { year: 2024 },
|
||||
isSaved: false,
|
||||
assets: [assetStub.image1],
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user