Rename Exercice's Keys as Flags

This commit is contained in:
nemunaire 2018-09-24 10:00:17 +02:00 committed by Pierre-Olivier Mercier
parent f36e1c4e4d
commit d21f3b0b83
18 changed files with 252 additions and 252 deletions

View file

@ -209,9 +209,9 @@ func (t Team) GetSolvedRank(e Exercice) (nb int64, err error) {
}
}
// HasPartiallySolved checks if the Team already has unlocked the given key and returns the validation's timestamp.
func (t Team) HasPartiallySolved(k Key) (tm *time.Time) {
DBQueryRow("SELECT MIN(time) FROM key_found WHERE id_team = ? AND id_key = ?", t.Id, k.Id).Scan(&tm)
// HasPartiallySolved checks if the Team already has unlocked the given flag and returns the validation's timestamp.
func (t Team) HasPartiallySolved(f Flag) (tm *time.Time) {
DBQueryRow("SELECT MIN(time) FROM flag_found WHERE id_team = ? AND id_flag = ?", t.Id, f.Id).Scan(&tm)
return
}