aboutsummaryrefslogtreecommitdiff
path: root/modules/user
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user')
-rw-r--r--modules/user/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/user/user.go b/modules/user/user.go
index 9a9a3b6..59e0631 100644
--- a/modules/user/user.go
+++ b/modules/user/user.go
@@ -3,11 +3,11 @@ package user
3import ( 3import (
4 "log" 4 "log"
5 "net/http" 5 "net/http"
6 "strconv"
7 6
8 "fagott.pw/charakterin" 7 "fagott.pw/charakterin"
9 "fagott.pw/grilist/grilist" 8 "fagott.pw/grilist/grilist"
10 "fagott.pw/grilist/modules/lists" 9 "fagott.pw/grilist/modules/lists"
10 "fagott.pw/grilist/util"
11 11
12 "github.com/julienschmidt/httprouter" 12 "github.com/julienschmidt/httprouter"
13) 13)
@@ -45,7 +45,7 @@ func (m *Module) ProvideDashboardData(user *charakterin.User) []grilist.Dashboar
45func (m *Module) viewUser(w http.ResponseWriter, r *http.Request, p httprouter.Params) { 45func (m *Module) viewUser(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
46 currentUser, _ := m.g.Charakterin.GetUserFromRequest(r) 46 currentUser, _ := m.g.Charakterin.GetUserFromRequest(r)
47 47
48 userID, err := strconv.Atoi(p.ByName("id")) 48 userID, err := util.ParseIDFromParams(p)
49 if err != nil { 49 if err != nil {
50 http.Redirect(w, r, "/", 302) 50 http.Redirect(w, r, "/", 302)
51 return 51 return