From 2aa1d6eecac69d0c067e91fa546256742c04b08c Mon Sep 17 00:00:00 2001 From: nemunaire Date: Sat, 6 Jan 2018 16:06:51 +0100 Subject: [PATCH] libfic: fix bad hints displayed --- libfic/hint.go | 4 ++-- libfic/team_my.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libfic/hint.go b/libfic/hint.go index aa374295..7029cb8d 100644 --- a/libfic/hint.go +++ b/libfic/hint.go @@ -9,8 +9,8 @@ type EHint struct { Id int64 `json:"id"` IdExercice int64 `json:"idExercice"` Title string `json:"title"` - Content string `json:"content"` - File string `json:"file"` + Content string `json:"content"` + File string `json:"file"` Cost int64 `json:"cost"` } diff --git a/libfic/team_my.go b/libfic/team_my.go index 56483d42..478d1260 100644 --- a/libfic/team_my.go +++ b/libfic/team_my.go @@ -17,8 +17,8 @@ type myTeamFile struct { type myTeamHint struct { HintId int64 `json:"id"` Title string `json:"title"` - Content *string `json:"content,omitempty"` - File *string `json:"file,omitempty"` + Content string `json:"content,omitempty"` + File string `json:"file,omitempty"` Cost int64 `json:"cost"` } type myTeamMCQ struct { @@ -124,9 +124,9 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) { } else { for _, h := range hints { if t == nil || t.HasHint(h) { - exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, &h.Content, &h.File, h.Cost}) + exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, h.Content, h.File, h.Cost}) } else { - exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, nil, nil, h.Cost}) + exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, "", "", h.Cost}) } } }