|
@@ -2,6 +2,7 @@ import { Controller, Get, Query, Post, Body } from '@nestjs/common'
|
|
|
import { ApiOperation, ApiTags } from '@nestjs/swagger'
|
|
|
|
|
|
import {
|
|
|
+ GetModuleListDto,
|
|
|
GetModuleConfigurationDto,
|
|
|
SaveModuleConfigurationDto
|
|
|
} from '@/dto/agent-module'
|
|
@@ -15,8 +16,8 @@ export class AgentModuleController {
|
|
|
|
|
|
@Get('get-module-list')
|
|
|
@ApiOperation({ summary: '获取模块列表' })
|
|
|
- async getModuleList() {
|
|
|
- return this.agentModuleService.getModuleList()
|
|
|
+ async getModuleList(@Query() query: GetModuleListDto) {
|
|
|
+ return this.agentModuleService.getModuleList(query.page, query.pageSize)
|
|
|
}
|
|
|
|
|
|
@Get('get-module-configuration')
|
|
@@ -29,11 +30,11 @@ export class AgentModuleController {
|
|
|
@ApiOperation({ summary: '保存模块配置' })
|
|
|
async saveModuleConfiguration(@Body() body: SaveModuleConfigurationDto) {
|
|
|
return this.agentModuleService.saveModuleConfiguration(
|
|
|
- body.id,
|
|
|
+ body.moduleId,
|
|
|
body.name,
|
|
|
body.displayName,
|
|
|
- body.defaultAgentType,
|
|
|
- body.defaultAgentId
|
|
|
+ body.type,
|
|
|
+ body.agentId
|
|
|
)
|
|
|
}
|
|
|
|