chore: refactor more queries (#25572)

* refactor: asset service queries

* chore: refactor more queries
This commit is contained in:
Daniel Dietzler
2026-02-19 16:48:30 +01:00
committed by GitHub
parent dadd20acfc
commit db4e7abf6d
11 changed files with 188 additions and 62 deletions
+3 -3
View File
@@ -128,10 +128,10 @@ export class PersonService extends BaseService {
async getFacesById(auth: AuthDto, dto: FaceDto): Promise<AssetFaceResponseDto[]> {
await this.requireAccess({ auth, permission: Permission.AssetRead, ids: [dto.id] });
const faces = await this.personRepository.getFaces(dto.id);
const asset = await this.assetRepository.getById(dto.id, { edits: true, exifInfo: true });
const assetDimensions = getDimensions(asset!.exifInfo!);
const asset = await this.assetRepository.getForFaces(dto.id);
const assetDimensions = getDimensions(asset);
return faces.map((face) => mapFaces(face, auth, asset!.edits!, assetDimensions));
return faces.map((face) => mapFaces(face, auth, asset.edits, assetDimensions));
}
async createNewFeaturePhoto(changeFeaturePhoto: string[]) {