my.json now contains team members, instead of teams.json
This commit is contained in:
parent
890d3e2fdf
commit
e207e90c2e
2 changed files with 5 additions and 4 deletions
|
|
@ -26,6 +26,7 @@ type myTeamExercice struct {
|
|||
type myTeam struct {
|
||||
Id int64 `json:"team_id"`
|
||||
Points int64 `json:"score"`
|
||||
Members []Member `json:"members"`
|
||||
Exercices map[string]myTeamExercice `json:"exercices"`
|
||||
}
|
||||
|
||||
|
|
@ -36,6 +37,10 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
} else {
|
||||
ret.Id = t.Id
|
||||
ret.Points, _ = t.GetPoints()
|
||||
if members, err := t.GetMembers(); err == nil {
|
||||
ret.Members = members
|
||||
}
|
||||
|
||||
}
|
||||
ret.Exercices = map[string]myTeamExercice{}
|
||||
|
||||
|
|
|
|||
Reference in a new issue