Handle optionnal flags
This commit is contained in:
parent
e581630d5e
commit
a414cd22c8
18 changed files with 68 additions and 22 deletions
|
@ -48,6 +48,7 @@ type myTeamFlag struct {
|
|||
PSolved *time.Time `json:"part_solved,omitempty"`
|
||||
Soluce string `json:"soluce,omitempty"`
|
||||
Justify bool `json:"justify,omitempty"`
|
||||
BonusGain int64 `json:"bonus_gain,omitempty"`
|
||||
Choices map[string]interface{} `json:"choices,omitempty"`
|
||||
ChoicesCost int64 `json:"choices_cost,omitempty"`
|
||||
Variant string `json:"variant,omitempty"`
|
||||
|
@ -275,6 +276,7 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
}
|
||||
|
||||
flag.Multiline = k.Multiline
|
||||
flag.BonusGain = int64(float64(k.BonusGain) * GlobalScoreCoefficient)
|
||||
|
||||
var fl FlagMCQLabel
|
||||
if fl, err = k.GetMCQJustification(); err == nil {
|
||||
|
|
Reference in a new issue