initial: standalone repo from monorepo split
This commit is contained in:
29
src/audit/audit.controller.ts
Normal file
29
src/audit/audit.controller.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { AuditService } from './audit.service';
|
||||
|
||||
@Controller('audit-logs')
|
||||
export class AuditController {
|
||||
constructor(private readonly service: AuditService) {}
|
||||
|
||||
@Get()
|
||||
getTenantAuditLogs(
|
||||
@Query('tenantId') tenantId?: string,
|
||||
@Query('userId') userId?: string,
|
||||
@Query('entity') entity?: string,
|
||||
@Query('action') action?: string,
|
||||
@Query('page') page?: number,
|
||||
@Query('limit') limit?: number,
|
||||
) {
|
||||
return this.service.getTenantAuditLogs({ tenantId, userId, entity, action, page, limit });
|
||||
}
|
||||
|
||||
@Get('platform')
|
||||
getPlatformAuditLogs(
|
||||
@Query('adminId') adminId?: string,
|
||||
@Query('action') action?: string,
|
||||
@Query('page') page?: number,
|
||||
@Query('limit') limit?: number,
|
||||
) {
|
||||
return this.service.getPlatformAuditLogs({ adminId, action, page, limit });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user