Write docs!
This commit is contained in:
parent
c460bb7bf5
commit
bcc598ebd5
37 changed files with 478 additions and 188 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// GetHistory aggregates all sources of events or actions for a Team
|
||||
func (t Team) GetHistory() ([]map[string]interface{}, error) {
|
||||
hist := make([]map[string]interface{}, 0)
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ func (t Team) GetHistory() ([]map[string]interface{}, error) {
|
|||
return hist, nil
|
||||
}
|
||||
|
||||
// DelHistoryItem removes from the database an entry from the history.
|
||||
func (t Team) DelHistoryItem(kind string, h time.Time, primary *int64, secondary *int64) (interface{}, error) {
|
||||
if kind == "tries" && primary != nil {
|
||||
if res, err := DBExec("DELETE FROM exercice_tries WHERE id_team = ? AND time = ? AND id_exercice = ?", t.Id, h, *primary); err != nil {
|
||||
|
|
|
|||
Reference in a new issue