mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(web): use time buckets of person detail page (3) (#3557)
* feat: add personId to time bucket endpoints * chore: open api * feat(web): time bucket on person detail page
This commit is contained in:
@@ -386,7 +386,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
}
|
||||
|
||||
private getBuilder(userId: string, options: TimeBucketOptions) {
|
||||
const { isArchived, isFavorite, albumId } = options;
|
||||
const { isArchived, isFavorite, albumId, personId } = options;
|
||||
|
||||
let builder = this.repository
|
||||
.createQueryBuilder('asset')
|
||||
@@ -406,6 +406,13 @@ export class AssetRepository implements IAssetRepository {
|
||||
builder = builder.andWhere('asset.isFavorite = :isFavorite', { isFavorite });
|
||||
}
|
||||
|
||||
if (personId !== undefined) {
|
||||
builder = builder
|
||||
.innerJoin('asset.faces', 'faces')
|
||||
.innerJoin('faces.person', 'person')
|
||||
.andWhere('person.id = :personId', { personId });
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user