frontend: polish public version checks
This commit is contained in:
parent
85d326db6b
commit
db22c4af1b
3 changed files with 38 additions and 9 deletions
|
|
@ -30,6 +30,8 @@ type myTeamFlag struct {
|
|||
Help string `json:"help,omitempty"`
|
||||
Separator string `json:"separator,omitempty"`
|
||||
IgnoreOrder bool `json:"ignore_order,omitempty"`
|
||||
IgnoreCase bool `json:"ignore_case,omitempty"`
|
||||
ValidatorRe *string `json:"validator_regexp,omitempty"`
|
||||
Solved *time.Time `json:"found,omitempty"`
|
||||
Soluce string `json:"soluce,omitempty"`
|
||||
Choices map[string]string `json:"choices,omitempty"`
|
||||
|
|
@ -189,6 +191,8 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
|
||||
// Retrieve solved state or solution for public iface
|
||||
if t == nil {
|
||||
flag.IgnoreCase = k.IgnoreCase
|
||||
flag.ValidatorRe = k.ValidatorRegexp
|
||||
flag.Soluce = hex.EncodeToString(k.Checksum)
|
||||
} else if PartialValidation {
|
||||
flag.Solved = t.HasPartiallySolved(k)
|
||||
|
|
|
|||
Reference in a new issue