From d55a93e653ff5d8810d539724c3d5a9ad96b8453 Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 20 Dec 2015 17:32:36 +0100 Subject: registration diff --git a/frontend/renderer.go b/frontend/renderer.go index 5673860..f03fe77 100644 --- a/frontend/renderer.go +++ b/frontend/renderer.go @@ -31,3 +31,8 @@ func (r *Renderer) RenderPage(name string, w http.ResponseWriter, data map[strin func (r *Renderer) RenderLoginPage(w http.ResponseWriter, data map[string]interface{}) { r.RenderPage("login", w, data) } + +// RenderRegistrationPage zeigt die Registrationsseite an. +func (r *Renderer) RenderRegistrationPage(w http.ResponseWriter, data map[string]interface{}) { + r.RenderPage("register", w, data) +} diff --git a/main.go b/main.go index c3d8ef6..f367922 100644 --- a/main.go +++ b/main.go @@ -48,6 +48,8 @@ func main() { router.HandlerFunc("GET", "/login", charakterin.DisplayLogin) router.HandlerFunc("POST", "/login", charakterin.Login) router.HandlerFunc("GET", "/logout", charakterin.Logout) + router.HandlerFunc("GET", "/register", charakterin.DisplayRegistration) + router.HandlerFunc("POST", "/register", charakterin.Register) router.GET("/", index) fs := http.FileServer(http.Dir("assets")) diff --git a/views/login.html b/views/login.html index 33627cb..d671d50 100644 --- a/views/login.html +++ b/views/login.html @@ -7,7 +7,7 @@
-
+

grilist

{{ if .error }} @@ -32,7 +32,7 @@
+
+
+ +
+
+
+ + +{{ end }} \ No newline at end of file -- cgit v0.10.1