19 lines
581 B
TypeScript
19 lines
581 B
TypeScript
/**
|
|
* 审计日志查询入口只返回脱敏后的最近记录。
|
|
*/
|
|
import { Controller, Get } from '@nestjs/common';
|
|
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
|
import { AuditRecordSummary, AuditService } from './audit.service';
|
|
|
|
@ApiTags('audit')
|
|
@Controller('audit-logs')
|
|
export class AuditController {
|
|
constructor(private readonly auditService: AuditService) {}
|
|
|
|
@Get()
|
|
@ApiOkResponse({ description: 'Recent sanitized audit records.' })
|
|
async listRecentRecords(): Promise<AuditRecordSummary[]> {
|
|
return this.auditService.getRecentRecords();
|
|
}
|
|
}
|