diff options
author | jan <jan@ruken.pw> | 2016-10-12 14:19:30 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-10-12 14:19:30 (UTC) |
commit | edccb755f60fd135e09db5c60385961eccc72818 (patch) | |
tree | 5fe8203a6becce2a6b6e0784e2d3b8729b52e03a /modules/grils | |
parent | def8ba82c69891244eb0f8eebe0cb0b3bb23955b (diff) |
bisschen cleanup, RemoveGrilFromList wird jetzt auch gecheckt auf list owner
Diffstat (limited to 'modules/grils')
-rw-r--r-- | modules/grils/grils.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go index 4a9990f..d68c6df 100644 --- a/modules/grils/grils.go +++ b/modules/grils/grils.go | |||
@@ -15,6 +15,7 @@ import ( | |||
15 | "fagott.pw/grilist/frontend" | 15 | "fagott.pw/grilist/frontend" |
16 | "fagott.pw/grilist/grilist" | 16 | "fagott.pw/grilist/grilist" |
17 | "fagott.pw/grilist/models" | 17 | "fagott.pw/grilist/models" |
18 | "fagott.pw/grilist/util" | ||
18 | 19 | ||
19 | "github.com/julienschmidt/httprouter" | 20 | "github.com/julienschmidt/httprouter" |
20 | ) | 21 | ) |
@@ -239,9 +240,8 @@ func (m *GrilsModule) FromIDs(ids []int) ([]*models.Gril, error) { | |||
239 | func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprouter.Params) { | 240 | func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprouter.Params) { |
240 | user, _ := m.g.Charakterin.GetUserFromRequest(r) | 241 | user, _ := m.g.Charakterin.GetUserFromRequest(r) |
241 | el := m.g.EventLogger(r) | 242 | el := m.g.EventLogger(r) |
242 | sid := p.ByName("id") | ||
243 | 243 | ||
244 | id, err := strconv.Atoi(sid) | 244 | id, err := util.ParseIDFromParams(p) |
245 | if err != nil { | 245 | if err != nil { |
246 | http.Redirect(w, r, "/", 302) | 246 | http.Redirect(w, r, "/", 302) |
247 | return | 247 | return |