diff --git a/client/src/components/admin/AdminTilePlayers.vue b/client/src/components/admin/AdminTilePlayers.vue
index 69cca66..3a309ed 100644
--- a/client/src/components/admin/AdminTilePlayers.vue
+++ b/client/src/components/admin/AdminTilePlayers.vue
@@ -9,7 +9,7 @@
{{ player.name }} |
- {{ player.quotes.length }} |
+ {{ player.numQuotes }} |
{{ player.score }} |
{{ player.isPlaying ? (player.isIdle ? 'idle' : 'active') : '-'}} |
diff --git a/server/src/game/getGameInfo.go b/server/src/game/getGameInfo.go
index 844a44b..0b432e4 100644
--- a/server/src/game/getGameInfo.go
+++ b/server/src/game/getGameInfo.go
@@ -6,7 +6,8 @@ func (gm *Game) GetGameInfo() *GameInfoJson {
gameInfo := gm.initGameInfoJson()
for i, _ := range gameInfo.Players {
- gameInfo.Players[i].Quotes = gm.getQuotesInfoByUserId(gameInfo.Players[i].Id)
+ quotes := gm.getQuotesInfoByUserId(gameInfo.Players[i].Id)
+ gameInfo.Players[i].NumberOfQuotes = len(quotes)
}
return gameInfo
}
diff --git a/server/src/game/struct.go b/server/src/game/struct.go
index 9865c15..0b972ab 100644
--- a/server/src/game/struct.go
+++ b/server/src/game/struct.go
@@ -81,12 +81,12 @@ type QuotesInfo struct {
}
type PlayerInfoJson struct {
- Id string `json:"id"`
- Name string `json:"name"`
- Score int `json:"score"`
- IsPlaying bool `json:"isPlaying"`
- IsIdle bool `json:"isIdle"`
- Quotes []Quote `json:"quotes"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Score int `json:"score"`
+ IsPlaying bool `json:"isPlaying"`
+ IsIdle bool `json:"isIdle"`
+ NumberOfQuotes int `json:"numQuotes"`
}
type GameInfoJson struct {