diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/grils/grils.go | 4 | ||||
-rw-r--r-- | modules/lists/lists.go | 11 |
2 files changed, 3 insertions, 12 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go index 8ec7bcb..a1c84c7 100644 --- a/modules/grils/grils.go +++ b/modules/grils/grils.go | |||
@@ -41,10 +41,6 @@ func (m *GrilsModule) Init(g *grilist.Grilist) { | |||
41 | m.g.Router.GET("/gril/:id", m.viewGril) | 41 | m.g.Router.GET("/gril/:id", m.viewGril) |
42 | } | 42 | } |
43 | 43 | ||
44 | func (m *GrilsModule) Interface() interface{} { | ||
45 | return m | ||
46 | } | ||
47 | |||
48 | func (m *GrilsModule) getGrils(whereClause string, params ...interface{}) ([]*Gril, error) { | 44 | func (m *GrilsModule) getGrils(whereClause string, params ...interface{}) ([]*Gril, error) { |
49 | var grils []*Gril | 45 | var grils []*Gril |
50 | 46 | ||
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 | }, |