backend: can open hint
This commit is contained in:
parent
d2d4f8e628
commit
4b20c1dc1e
4 changed files with 52 additions and 0 deletions
|
|
@ -216,6 +216,11 @@ func (t Team) HasHint(h EHint) (bool) {
|
|||
return tm != nil
|
||||
}
|
||||
|
||||
func (t Team) OpenHint(h EHint) (error) {
|
||||
_, err := DBExec("INSERT INTO team_hints (id_team, id_hint, time) VALUES (?, ?, ?)", t.Id, h.Id, time.Now())
|
||||
return err
|
||||
}
|
||||
|
||||
func (t Team) HasSolved(e Exercice) (bool, time.Time, int64) {
|
||||
var nb *int64
|
||||
var tm *time.Time
|
||||
|
|
|
|||
Reference in a new issue