From 210c7b6c0eb4dac9bd7cbd9025dcb8032320dbde Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 21 Sep 2013 12:01:51 +0200 Subject: Added index page --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 503453f..b44e7e5 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "github.com/gorilla/mux" "github.com/gorilla/sessions" "github.com/kch42/mailremind/confhelper" + "github.com/kch42/mailremind/model" _ "github.com/kch42/mailremind/model/mysql" "github.com/kch42/simpleconf" "log" @@ -82,6 +83,7 @@ func main() { router.HandleFunc("/jobedit", mkHttpHandler(jobedit, tplJobedit)) router.HandleFunc("/jobedit/{ID}", mkHttpHandler(jobedit, tplJobedit)) router.HandleFunc("/settings", mkHttpHandler(settings, tplSettings)) + router.HandleFunc("/", mkHttpHandler(index, tplIndex)) http.Handle("/", router) @@ -89,3 +91,7 @@ func main() { log.Fatalf("Could not ListenAndServe: %s", err) } } + +func index(user model.User, sess *sessions.Session, req *http.Request) (interface{}, model.User) { + return nil, user +} -- cgit v1.2.3-70-g09d2