aboutsummaryrefslogtreecommitdiff
path: root/modules/series
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-10-12 20:49:25 (UTC)
committerrtz12 <koenig@fagott.pw>2016-10-12 20:49:25 (UTC)
commitc582d1cd2ff9f0f642ff750c73fc04c962dc5560 (patch)
tree91fa99bb6eed2af3462f892daab5b142b033fde1 /modules/series
parent593659727c0b30e8806dbd622c45760865467be2 (diff)
Logging fuer Series und Tags eingebaut
Diffstat (limited to 'modules/series')
-rw-r--r--modules/series/series.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/series/series.go b/modules/series/series.go
index 295e16b..c354de7 100644
--- a/modules/series/series.go
+++ b/modules/series/series.go
@@ -5,7 +5,9 @@ import (
5 "strconv" 5 "strconv"
6 6
7 "fagott.pw/charakterin" 7 "fagott.pw/charakterin"
8 "fagott.pw/grilist/eventlogging"
8 "fagott.pw/grilist/grilist" 9 "fagott.pw/grilist/grilist"
10
9 "github.com/julienschmidt/httprouter" 11 "github.com/julienschmidt/httprouter"
10) 12)
11 13
@@ -32,13 +34,17 @@ func (m *Module) ProvideDashboardData(user *charakterin.User) []grilist.Dashboar
32} 34}
33 35
34func (m *Module) viewSeries(w http.ResponseWriter, r *http.Request, p httprouter.Params) { 36func (m *Module) viewSeries(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
35 _, _ = m.g.Charakterin.GetUserFromRequest(r) 37 el := m.g.EventLogger(r)
38 user, _ := m.g.Charakterin.GetUserFromRequest(r)
36 39
37 _, err := strconv.Atoi(p.ByName("id")) 40 id, err := strconv.Atoi(p.ByName("id"))
38 if err != nil { 41 if err != nil {
39 http.Redirect(w, r, "/", 302) 42 http.Redirect(w, r, "/", 302)
40 return 43 return
41 } 44 }
42 45
43 http.Error(w, "not implemented", 500) 46 http.Error(w, "not implemented", 500)
47 el.ViewSeries(user, eventlogging.ViewSeriesData{
48 SeriesID: id,
49 })
44} 50}