Update ServerListResp to include HumanCount instead of PlayerCount
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 40s

This commit is contained in:
2025-10-06 18:59:15 +08:00
parent 97c68bafa2
commit 18f1f6f38c
3 changed files with 15 additions and 15 deletions

View File

@@ -182,13 +182,13 @@ type (
type ( type (
ServerListReq {} ServerListReq {}
ServerListResp { ServerListResp {
ServerName string `json:"serverName"` // Server name ServerName string `json:"serverName"` // Server name
ServerIP string `json:"serverIP"` // Server IP address ServerIP string `json:"serverIP"` // Server IP address
ServerPort int `json:"serverPort"` // Server port ServerPort int `json:"serverPort"` // Server port
Category string `json:"category"` // Server category Category string `json:"category"` // Server category
MapName string `json:"mapName"` // Current map name MapName string `json:"mapName"` // Current map name
PlayerCount int `json:"playerCount"` // Current player count HumanCount int `json:"humanCount"` // Current human player count
BotCount int `json:"botCount"` // Bot count BotCount int `json:"botCount"` // Bot count
} }
) )

View File

@@ -44,7 +44,7 @@ func (l *ServerListLogic) ServerList(req *types.ServerListReq) (resp []types.Ser
&server.ServerPort, &server.ServerPort,
&server.Category, &server.Category,
&server.BotCount, &server.BotCount,
&server.PlayerCount, &server.HumanCount,
&server.MapName, &server.MapName,
) )
if err != nil { if err != nil {

View File

@@ -70,13 +70,13 @@ type ServerListReq struct {
} }
type ServerListResp struct { type ServerListResp struct {
ServerName string `json:"serverName"` // Server name ServerName string `json:"serverName"` // Server name
ServerIP string `json:"serverIP"` // Server IP address ServerIP string `json:"serverIP"` // Server IP address
ServerPort int `json:"serverPort"` // Server port ServerPort int `json:"serverPort"` // Server port
Category string `json:"category"` // Server category Category string `json:"category"` // Server category
MapName string `json:"mapName"` // Current map name MapName string `json:"mapName"` // Current map name
PlayerCount int `json:"playerCount"` // Current player count HumanCount int `json:"humanCount"` // Current human player count
BotCount int `json:"botCount"` // Bot count BotCount int `json:"botCount"` // Bot count
} }
type TopKillerReq struct { type TopKillerReq struct {