Your Name vor 1 Jahr
Ursprung
Commit
f0787757da
1 geänderte Dateien mit 10 neuen und 1 gelöschten Zeilen
  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) {