diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-02-11 15:19:17 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-02-11 15:19:17 (GMT) |
commit | d4761d9b12b8c552f9d6fe6c17f8db3b6894ba90 (patch) | |
tree | 9ef226d5544051888e3e0fa6fb620f86937edbef /rddb | |
parent | 4dbf06dc21143c2fb81855b8d60cacf85f7ece6b (diff) |
also include jingle group name in JingleListEntry
Diffstat (limited to 'rddb')
-rw-r--r-- | rddb/rddb.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rddb/rddb.go b/rddb/rddb.go index b2fedf4..e17f3fb 100644 --- a/rddb/rddb.go +++ b/rddb/rddb.go @@ -149,6 +149,7 @@ type getShowCartListRequest struct { } type JingleListEntry struct { + Group string Description string ActiveCart int InactiveCart int @@ -468,15 +469,15 @@ func (db *DB) getJingleList(username string) (result getJingleListResult) { result.jingles = make(map[string]JingleListEntry) for rows.Next() { var jingle JingleListEntry - var name, params string + var params string - if result.err = rows.Scan(&name, ¶ms, &jingle.ActiveCart, &jingle.InactiveCart, &jingle.Description); result.err != nil { + if result.err = rows.Scan(&jingle.Group, ¶ms, &jingle.ActiveCart, &jingle.InactiveCart, &jingle.Description); result.err != nil { return } if params[0] != 'J' { continue } - result.jingles[name] = jingle + result.jingles[jingle.Group] = jingle } result.err = rows.Err() return |