mirror of
https://github.com/LukeHagar/immich.git
synced 2025-12-06 20:47:48 +00:00
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:
18
server/src/controllers/duplicate.controller.ts
Normal file
18
server/src/controllers/duplicate.controller.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||
import { DuplicateService } from 'src/services/duplicate.service';
|
||||
|
||||
@ApiTags('Duplicate')
|
||||
@Controller('duplicates')
|
||||
export class DuplicateController {
|
||||
constructor(private service: DuplicateService) {}
|
||||
|
||||
@Get()
|
||||
@Authenticated()
|
||||
getAssetDuplicates(@Auth() auth: AuthDto): Promise<AssetResponseDto[]> {
|
||||
return this.service.getDuplicates(auth);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user