feat(task1): restructure directories for turborepo monorepo
- Move backend/ to apps/server/ via git mv - Move frontend/ to apps/admin/ via git mv - Create packages/typescript-config/ with base, nestjs, and react-vite presets
This commit is contained in:
30
apps/server/src/operation-logs/operation-logs.controller.ts
Normal file
30
apps/server/src/operation-logs/operation-logs.controller.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Controller, Get, Query, UseGuards } from '@nestjs/common';
|
||||
import { OperationLogsService } from './operation-logs.service';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
import { RequirePermission } from '../auth/decorators/permission.decorator';
|
||||
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@RequirePermission('log:view')
|
||||
@Controller('operation-logs')
|
||||
export class OperationLogsController {
|
||||
constructor(private service: OperationLogsService) {}
|
||||
|
||||
@Get()
|
||||
findAll(
|
||||
@Query('module') module?: string,
|
||||
@Query('userId') userId?: string,
|
||||
@Query('startDate') startDate?: string,
|
||||
@Query('endDate') endDate?: string,
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return this.service.findAll({
|
||||
module,
|
||||
userId: userId ? +userId : undefined,
|
||||
startDate,
|
||||
endDate,
|
||||
page: page ? +page : 1,
|
||||
pageSize: pageSize ? +pageSize : 50,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user