Stores ignorecase property for flags

This commit is contained in:
nemunaire 2018-09-24 09:23:09 +02:00 committed by Pierre-Olivier Mercier
commit f36e1c4e4d
6 changed files with 19 additions and 13 deletions

View file

@ -190,7 +190,8 @@ func deleteExerciceHint(hint fic.EHint, _ []byte) (interface{}, error) {
type uploadedKey struct {
Label string
Help string
Help string
ICase bool
Key string
Hash []byte
}
@ -205,7 +206,7 @@ func createExerciceKey(exercice fic.Exercice, body []byte) (interface{}, error)
return nil, errors.New("Key not filled")
}
return exercice.AddRawKey(uk.Label, uk.Help, uk.Key)
return exercice.AddRawKey(uk.Label, uk.Help, uk.ICase, uk.Key)
}
func showExerciceKey(key fic.Key, _ fic.Exercice, body []byte) (interface{}, error) {
@ -225,6 +226,7 @@ func updateExerciceKey(key fic.Key, exercice fic.Exercice, body []byte) (interfa
}
key.Help = uk.Help
key.IgnoreCase = uk.ICase
key.Checksum = uk.Hash
if _, err := key.Update(); err != nil {