aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/grils/grils.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go
index b0aa486..a7cc65e 100644
--- a/modules/grils/grils.go
+++ b/modules/grils/grils.go
@@ -109,11 +109,21 @@ func (m *GrilsModule) ProvideDashboardData(user *charakterin.User) []grilist.Das
109 109
110 for rows.Next() { 110 for rows.Next() {
111 var g models.Gril 111 var g models.Gril
112 if err := rows.Scan(&g.ID, &g.RomajiName, &g.KanjiName); err != nil { 112
113 var romaji *string
114 var kanji *string
115 if err := rows.Scan(&g.ID, &romaji, &kanji); err != nil {
113 log.Println(err) 116 log.Println(err)
114 continue 117 continue
115 } 118 }
116 119
120 if romaji != nil {
121 g.RomajiName = *romaji
122 }
123 if kanji != nil {
124 g.KanjiName = *kanji
125 }
126
117 cat.Cards = append(cat.Cards, frontend.Card{ 127 cat.Cards = append(cat.Cards, frontend.Card{
118 Title: g.RomajiName, 128 Title: g.RomajiName,
119 Description: g.KanjiName, 129 Description: g.KanjiName,