From fce5b26e5dcf706882aecca317aa2767066bf0f6 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Sat, 23 Jan 2016 19:53:17 +0100 Subject: [PATCH] Points are given through my.json --- frontend/static/index.html | 2 +- libfic/team_my.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/static/index.html b/frontend/static/index.html index 8a172a2f..b4bb25ff 100644 --- a/frontend/static/index.html +++ b/frontend/static/index.html @@ -74,7 +74,7 @@ edit

{{ teams[my.team_id].rank }}e sur {{ teams_count }} – - {{ teams[my.team_id].score }} points + {{ my.score }} points classement diff --git a/libfic/team_my.go b/libfic/team_my.go index 5401cf04..f134eaab 100644 --- a/libfic/team_my.go +++ b/libfic/team_my.go @@ -25,6 +25,7 @@ type myTeamExercice struct { } type myTeam struct { Id int64 `json:"team_id"` + Points int64 `json:"score"` Exercices map[string]myTeamExercice `json:"exercices"` } @@ -35,6 +36,7 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) { } else { ret.Id = t.Id } + ret.Points, _ = t.GetPoints() ret.Exercices = map[string]myTeamExercice{} if exos, err := GetExercices(); err != nil {