ソースを参照

feat: 添加操作人

huangzhichao 8 時間 前
コミット
66f467fa91

+ 4 - 0
src/dto/agent-list.ts

@@ -31,6 +31,10 @@ export class GetNativeAgentConfigurationDto {
 }
 
 export class SaveNativeAgentConfigurationDto {
+  @IsString()
+  @IsNotEmpty({ message: 'user不能为空' })
+  user: string
+
   @IsNumber()
   @IsOptional()
   agentId?: number

+ 1 - 0
src/module/agent-list/agent-list.controller.ts

@@ -39,6 +39,7 @@ export class AgentListController {
     @Body() body: SaveNativeAgentConfigurationDto
   ) {
     return this.agentListService.saveNativeAgentConfiguration({
+      user: body.user,
       agent_id: body.agentId,
       name: body.name,
       display_name: body.displayName,

+ 1 - 0
src/module/agent-list/type.d.ts

@@ -24,6 +24,7 @@ type AgentConfigurationType = {
 }
 
 type SaveAgentConfigurationType = {
+  user: string
   agent_id?: number
   name: string
   display_name?: string