aboutsummaryrefslogtreecommitdiff
path: root/modules/series
diff options
context:
space:
mode:
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}