mirror of
https://github.com/immich-app/immich.git
synced 2026-03-06 18:17:27 +03:00
fix(server): live photo relation (#10637)
* fix(server): live photo relation * handle deletion and unit test * lint * chore: clean up and e2e tests * fix test * sql --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -249,6 +249,16 @@ export class AssetRepository implements IAssetRepository {
|
||||
return items.map((asset) => asset.deviceAssetId);
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.UUID] })
|
||||
getLivePhotoCount(motionId: string): Promise<number> {
|
||||
return this.repository.count({
|
||||
where: {
|
||||
livePhotoVideoId: motionId,
|
||||
},
|
||||
withDeleted: true,
|
||||
});
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.UUID] })
|
||||
getById(
|
||||
id: string,
|
||||
|
||||
Reference in New Issue
Block a user