2024-04-20 02:35:54 +02:00
|
|
|
import { Controller, Get, Query } from '@nestjs/common';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { ApiTags } from '@nestjs/swagger';
|
2024-04-20 02:35:54 +02:00
|
|
|
import { AuditDeletesDto, AuditDeletesResponseDto } from 'src/dtos/audit.dto';
|
2024-03-20 23:53:07 +01:00
|
|
|
import { AuthDto } from 'src/dtos/auth.dto';
|
2024-04-20 02:35:54 +02:00
|
|
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
2024-03-21 00:07:30 +01:00
|
|
|
import { AuditService } from 'src/services/audit.service';
|
2023-08-24 21:28:50 +02:00
|
|
|
|
|
|
|
@ApiTags('Audit')
|
|
|
|
@Controller('audit')
|
|
|
|
export class AuditController {
|
|
|
|
constructor(private service: AuditService) {}
|
|
|
|
|
|
|
|
@Get('deletes')
|
2024-05-09 19:58:44 +02:00
|
|
|
@Authenticated()
|
2023-12-10 05:34:12 +01:00
|
|
|
getAuditDeletes(@Auth() auth: AuthDto, @Query() dto: AuditDeletesDto): Promise<AuditDeletesResponseDto> {
|
|
|
|
return this.service.getDeletes(auth, dto);
|
2023-08-24 21:28:50 +02:00
|
|
|
}
|
|
|
|
}
|