aboutsummaryrefslogtreecommitdiff
path: root/modules/grils
diff options
context:
space:
mode:
Diffstat (limited to 'modules/grils')
-rw-r--r--modules/grils/grils.go4
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) {
239func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprouter.Params) { 240func (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