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}) } } }