diff options
author | jan <jan@ruken.pw> | 2015-12-28 23:11:01 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2015-12-28 23:11:01 (UTC) |
commit | e90f77d8cc4cc29a2d16b8b2257642befee45e77 (patch) | |
tree | cde8883ad22538836d8ddea1651e207cda9b01c7 /modules/lists | |
parent | 6ffa881ed739d62ec36b0d5bf0bf8f4f179d62b5 (diff) |
interfacekacke entfernt
Diffstat (limited to 'modules/lists')
-rw-r--r-- | modules/lists/lists.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/lists/lists.go b/modules/lists/lists.go index 47501c2..dcc7046 100644 --- a/modules/lists/lists.go +++ b/modules/lists/lists.go | |||
@@ -52,7 +52,7 @@ func (m *Module) Init(g *grilist.Grilist) { | |||
52 | log.Fatal("lists: grils module not found") | 52 | log.Fatal("lists: grils module not found") |
53 | } | 53 | } |
54 | 54 | ||
55 | grilsModule, ok := gm.Interface().(*grils.GrilsModule) | 55 | grilsModule, ok := gm.(*grils.GrilsModule) |
56 | if !ok { | 56 | if !ok { |
57 | log.Fatal("lists: error with grils module") | 57 | log.Fatal("lists: error with grils module") |
58 | } | 58 | } |
@@ -60,11 +60,6 @@ func (m *Module) Init(g *grilist.Grilist) { | |||
60 | m.g.Router.GET("/list/:id", m.viewList) | 60 | m.g.Router.GET("/list/:id", m.viewList) |
61 | } | 61 | } |
62 | 62 | ||
63 | // Interface gibt das Modul zurück | ||
64 | func (m *Module) Interface() interface{} { | ||
65 | return m | ||
66 | } | ||
67 | |||
68 | func (m *Module) getListGrils(list *List) error { | 63 | func (m *Module) getListGrils(list *List) error { |
69 | rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1`, list.ID) | 64 | rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1`, list.ID) |
70 | if err != nil { | 65 | if err != nil { |
@@ -161,8 +156,8 @@ func listsToCards(lists []*List) []frontend.Card { | |||
161 | Link: fmt.Sprintf("/list/%d", list.ID), | 156 | Link: fmt.Sprintf("/list/%d", list.ID), |
162 | }, | 157 | }, |
163 | frontend.Action{ | 158 | frontend.Action{ |
164 | Name: fmt.Sprintf(`<span class="chip">%d gril%s</span>`, len(list.Grils), s), | 159 | Name: fmt.Sprintf(`<span class="chip">%d gril%s</span>`, len(list.Grils), s), |
165 | Link: "#", | 160 | Link: "#", |
166 | Disabled: true, | 161 | Disabled: true, |
167 | }, | 162 | }, |
168 | }, | 163 | }, |