backend: Don't consider non error in MCQ as good response
This commit is contained in:
parent
0a8d0dad30
commit
4b1b5445f7
5 changed files with 12 additions and 8 deletions
|
|
@ -335,8 +335,9 @@ func (k *FlagKey) Check(v interface{}) int {
|
|||
}
|
||||
|
||||
// FoundBy registers in the database that the given Team solved the flag.
|
||||
func (k *FlagKey) FoundBy(t *Team) {
|
||||
DBExec("INSERT INTO flag_found (id_flag, id_team, time) VALUES (?, ?, ?)", k.Id, t.Id, time.Now())
|
||||
func (k *FlagKey) FoundBy(t *Team) (err error) {
|
||||
_, err = DBExec("INSERT INTO flag_found (id_flag, id_team, time) VALUES (?, ?, ?)", k.Id, t.Id, time.Now())
|
||||
return
|
||||
}
|
||||
|
||||
// GetExercice returns the parent Exercice where this flag can be found.
|
||||
|
|
|
|||
Reference in a new issue