Your Name 1 year ago
parent
commit
f0787757da
1 changed files with 10 additions and 1 deletions
  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) {