Your Name 1 년 전
부모
커밋
f0787757da
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      handler/admin/robot.go

+ 10 - 1
handler/admin/robot.go

@@ -35,7 +35,16 @@ func QueryRobotList(c *gin.Context) {
 		return
 	}
 
-	webutils.SuccessResponse(c, robotList)
+	resultList := make([]QueryRobotResp, 0)
+	for _, robot := range robotList {
+		resultList = append(resultList, QueryRobotResp{
+			ID:       uint32(robot.ID),
+			Nikename: robot.Nickname,
+			Token:    robot.Token,
+		})
+	}
+
+	webutils.SuccessResponse(c, resultList)
 }
 
 func CreateRobot(c *gin.Context) {