aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grilist/grilist.go1
-rw-r--r--modules/grils/grils.go4
-rw-r--r--modules/lists/lists.go11
3 files changed, 3 insertions, 13 deletions
diff --git a/grilist/grilist.go b/grilist/grilist.go
index baff81c..f9a79b2 100644
--- a/grilist/grilist.go
+++ b/grilist/grilist.go
@@ -23,7 +23,6 @@ type Grilist struct {
23// Module ist ein Modul für Grilist. 23// Module ist ein Modul für Grilist.
24type Module interface { 24type Module interface {
25 Init(*Grilist) 25 Init(*Grilist)
26 Interface() interface{}
27 Name() string 26 Name() string
28 ProvideDashboardData(*charakterin.User) []DashboardCategory 27 ProvideDashboardData(*charakterin.User) []DashboardCategory
29} 28}
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
44func (m *GrilsModule) Interface() interface{} {
45 return m
46}
47
48func (m *GrilsModule) getGrils(whereClause string, params ...interface{}) ([]*Gril, error) { 44func (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
64func (m *Module) Interface() interface{} {
65 return m
66}
67
68func (m *Module) getListGrils(list *List) error { 63func (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 },