summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-09-21 12:01:51 +0200
committerKevin Chabowski <kevin@kch42.de>2013-09-21 12:01:51 +0200
commit210c7b6c0eb4dac9bd7cbd9025dcb8032320dbde (patch)
treed72ed72f5565b384893c93d10262599f76babe3f /main.go
parentac949695791da439496c4ce96ddda3153437e23a (diff)
downloadmailremind-210c7b6c0eb4dac9bd7cbd9025dcb8032320dbde.tar.gz
mailremind-210c7b6c0eb4dac9bd7cbd9025dcb8032320dbde.tar.bz2
mailremind-210c7b6c0eb4dac9bd7cbd9025dcb8032320dbde.zip
Added index page
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
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
+}