From 9a43bfc5bbdf58b8f67e4e30d0ec5dcec1bd0014 Mon Sep 17 00:00:00 2001
From: Mihai Parparita
Date: Fri, 17 Oct 2014 20:45:51 -0700
Subject: [PATCH] Switch sigining in and out to using forms with POST.
---
app/githop.go | 4 ++--
app/templates/index-signed-out.html | 6 +++---
app/templates/index.html | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/githop.go b/app/githop.go
index dff1465..6202212 100644
--- a/app/githop.go
+++ b/app/githop.go
@@ -41,8 +41,8 @@ func init() {
router = mux.NewRouter()
router.HandleFunc("/", indexHandler).Name("index")
- router.HandleFunc("/session/sign-in", signInHandler).Name("sign-in")
- router.HandleFunc("/session/sign-out", signOutHandler).Name("sign-out")
+ router.HandleFunc("/session/sign-in", signInHandler).Name("sign-in").Methods("POST")
+ router.HandleFunc("/session/sign-out", signOutHandler).Name("sign-out").Methods("POST")
router.HandleFunc("/github/callback", githubOAuthCallbackHandler)
router.HandleFunc("/digest/view", viewDigestHandler).Name("view-digest")
diff --git a/app/templates/index-signed-out.html b/app/templates/index-signed-out.html
index ff675c6..c067897 100644
--- a/app/templates/index-signed-out.html
+++ b/app/templates/index-signed-out.html
@@ -2,8 +2,8 @@
{{define "body"}}
-
- Sign In
-
+
{{end}}
diff --git a/app/templates/index.html b/app/templates/index.html
index b4d71fd..86b5e8e 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -15,9 +15,9 @@
height="20"
border="0">{{.User.Login}}
.
-
- Sign Out
-
+