diff options
author | rtz12 <koenig@fagott.pw> | 2015-12-28 22:21:05 (UTC) |
---|---|---|
committer | rtz12 <koenig@fagott.pw> | 2015-12-28 22:21:05 (UTC) |
commit | b4c2a5c6d571a44621db07b9930e812868604c6b (patch) | |
tree | 6d2e40636dcc2c149e058cc1aaa89c1edcb6f7a5 /modules/grils/grils.go | |
parent | d0b0fb006174dfd5b98eae1523ef0fa1fa3db3d2 (diff) |
Hippe Schnecken fuer die Gril-URLs
Diffstat (limited to 'modules/grils/grils.go')
-rw-r--r-- | modules/grils/grils.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go index 8ec7bcb..7ea5259 100644 --- a/modules/grils/grils.go +++ b/modules/grils/grils.go | |||
@@ -1,16 +1,18 @@ | |||
1 | package grils | 1 | package grils |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fagott.pw/charakterin" | ||
5 | "fagott.pw/grilist/frontend" | ||
6 | "fagott.pw/grilist/grilist" | ||
7 | "fmt" | 4 | "fmt" |
8 | "github.com/julienschmidt/httprouter" | ||
9 | "log" | 5 | "log" |
10 | "net/http" | 6 | "net/http" |
11 | "regexp" | 7 | "regexp" |
12 | "strconv" | 8 | "strconv" |
13 | "strings" | 9 | "strings" |
10 | |||
11 | "fagott.pw/charakterin" | ||
12 | "fagott.pw/grilist/frontend" | ||
13 | "fagott.pw/grilist/grilist" | ||
14 | |||
15 | "github.com/julienschmidt/httprouter" | ||
14 | ) | 16 | ) |
15 | 17 | ||
16 | var ( | 18 | var ( |
@@ -39,6 +41,7 @@ func (m *GrilsModule) Init(g *grilist.Grilist) { | |||
39 | findIdx() | 41 | findIdx() |
40 | m.g = g | 42 | m.g = g |
41 | m.g.Router.GET("/gril/:id", m.viewGril) | 43 | m.g.Router.GET("/gril/:id", m.viewGril) |
44 | m.g.Router.GET("/gril/:id/*rest", m.viewGril) | ||
42 | } | 45 | } |
43 | 46 | ||
44 | func (m *GrilsModule) Interface() interface{} { | 47 | func (m *GrilsModule) Interface() interface{} { |
@@ -128,7 +131,7 @@ func (m *GrilsModule) ProvideDashboardData(user *charakterin.User) []grilist.Das | |||
128 | Actions: []frontend.Action{ | 131 | Actions: []frontend.Action{ |
129 | frontend.Action{ | 132 | frontend.Action{ |
130 | Name: "anguckieren", | 133 | Name: "anguckieren", |
131 | Link: fmt.Sprintf("/gril/%d", gril.ID), | 134 | Link: "/gril/" + gril.Slug(), |
132 | }, | 135 | }, |
133 | }, | 136 | }, |
134 | }) | 137 | }) |