mirror of
https://github.com/LukeHagar/immich.git
synced 2025-12-10 04:20:16 +00:00
chore(server): return duplicate assets as group (#9576)
* chore(server): return duplicate assets as group * file name
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
|
||||
import { mapAsset } from 'src/dtos/asset-response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { DuplicateResponseDto, mapDuplicateResponse } from 'src/dtos/duplicate.dto';
|
||||
import { AssetEntity } from 'src/entities/asset.entity';
|
||||
import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface';
|
||||
import { ICryptoRepository } from 'src/interfaces/crypto.interface';
|
||||
@@ -35,9 +36,10 @@ export class DuplicateService {
|
||||
this.configCore = SystemConfigCore.create(systemMetadataRepository, logger);
|
||||
}
|
||||
|
||||
async getDuplicates(auth: AuthDto): Promise<AssetResponseDto[]> {
|
||||
async getDuplicates(auth: AuthDto): Promise<DuplicateResponseDto[]> {
|
||||
const res = await this.assetRepository.getDuplicates({ userIds: [auth.user.id] });
|
||||
return res.map((a) => mapAsset(a, { auth }));
|
||||
|
||||
return mapDuplicateResponse(res.map((a) => mapAsset(a, { auth })));
|
||||
}
|
||||
|
||||
async handleQueueSearchDuplicates({ force }: IBaseJob): Promise<JobStatus> {
|
||||
|
||||
Reference in New Issue
Block a user