2024-05-16 19:39:33 -04:00
|
|
|
import { Controller, Get } from '@nestjs/common';
|
|
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
|
|
import { AuthDto } from 'src/dtos/auth.dto';
|
2024-05-18 13:15:56 -05:00
|
|
|
import { DuplicateResponseDto } from 'src/dtos/duplicate.dto';
|
2024-05-16 19:39:33 -04:00
|
|
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
|
|
|
import { DuplicateService } from 'src/services/duplicate.service';
|
|
|
|
|
2024-05-30 00:26:57 +02:00
|
|
|
@ApiTags('Duplicates')
|
2024-05-16 19:39:33 -04:00
|
|
|
@Controller('duplicates')
|
|
|
|
export class DuplicateController {
|
|
|
|
constructor(private service: DuplicateService) {}
|
|
|
|
|
|
|
|
@Get()
|
|
|
|
@Authenticated()
|
2024-05-18 13:15:56 -05:00
|
|
|
getAssetDuplicates(@Auth() auth: AuthDto): Promise<DuplicateResponseDto[]> {
|
2024-05-16 19:39:33 -04:00
|
|
|
return this.service.getDuplicates(auth);
|
|
|
|
}
|
|
|
|
}
|