Sent keys type in my.json
This commit is contained in:
parent
59ae11e68d
commit
a1d60ee78f
|
@ -20,13 +20,14 @@ type myTeamFile struct {
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Checksum []byte `json:"checksum"`
|
Checksum []byte `json:"checksum"`
|
||||||
Size int64 `json:"size"`
|
Size int64 `json:"size"`
|
||||||
}
|
}
|
||||||
type myTeamExercice struct {
|
type myTeamExercice struct {
|
||||||
Statement string `json:"statement"`
|
Statement string `json:"statement"`
|
||||||
Hint string `json:"hint"`
|
Hint string `json:"hint"`
|
||||||
Gain int64 `json:"gain"`
|
Gain int64 `json:"gain"`
|
||||||
Files []myTeamFile `json:"files"`
|
Files []myTeamFile `json:"files"`
|
||||||
|
Keys []string `json:"keys"`
|
||||||
Solved bool `json:"solved"`
|
Solved bool `json:"solved"`
|
||||||
SolvedTime time.Time `json:"solved_time"`
|
SolvedTime time.Time `json:"solved_time"`
|
||||||
SolvedNumber int64 `json:"solved_number"`
|
SolvedNumber int64 `json:"solved_number"`
|
||||||
|
@ -50,6 +51,18 @@ func myJSONTeam(t fic.Team) (interface{}, error) {
|
||||||
exercice.Statement = e.Statement
|
exercice.Statement = e.Statement
|
||||||
exercice.Hint = e.Hint
|
exercice.Hint = e.Hint
|
||||||
exercice.Solved, exercice.SolvedTime, exercice.SolvedNumber = t.HasSolved(e)
|
exercice.Solved, exercice.SolvedTime, exercice.SolvedNumber = t.HasSolved(e)
|
||||||
|
|
||||||
|
exercice.Keys = []string{}
|
||||||
|
|
||||||
|
if keys, err := e.GetKeys(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else {
|
||||||
|
for _, k := range keys {
|
||||||
|
exercice.Keys = append(exercice.Keys, k.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
exercice.Files = []myTeamFile{}
|
exercice.Files = []myTeamFile{}
|
||||||
|
|
||||||
if files, err := e.GetFiles(); err != nil {
|
if files, err := e.GetFiles(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user