refactor(server): duplicate controller and service (#9542)

* duplicate controller and service

* change endpoint name

* fix search tests

* remove unused import

* add to index
This commit is contained in:
Mert
2024-05-16 19:39:33 -04:00
committed by GitHub
parent 936a46b4ed
commit ff52300624
9 changed files with 430 additions and 361 deletions

View File

@@ -286,11 +286,6 @@ export class AssetService {
return data;
}
async getDuplicates(auth: AuthDto): Promise<AssetResponseDto[]> {
const res = await this.assetRepository.getDuplicates({ userIds: [auth.user.id] });
return res.map((a) => mapAsset(a, { auth }));
}
async update(auth: AuthDto, id: string, dto: UpdateAssetDto): Promise<AssetResponseDto> {
await this.access.requirePermission(auth, Permission.ASSET_UPDATE, id);