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/user | |
parent | def8ba82c69891244eb0f8eebe0cb0b3bb23955b (diff) |
bisschen cleanup, RemoveGrilFromList wird jetzt auch gecheckt auf list owner
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/user.go | 4 |
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 | |||
3 | import ( | 3 | import ( |
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 | |||
45 | func (m *Module) viewUser(w http.ResponseWriter, r *http.Request, p httprouter.Params) { | 45 | func (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 |