commit 95290c446e09e9ca797b9948d8395722b2347ece
parent 427ab4266e58658b765a3246a7b2c6bea291ca1f
Author: MTRNord <mtrnord1@gmail.com>
Date: Mon, 2 Apr 2018 19:59:33 +0200
Check out why the check returns the wrong status code
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/api/login/twitter.go b/api/login/twitter.go
@@ -180,8 +180,10 @@ func IsAuthenticated(req *http.Request) bool {
// IsAuthenticatedHandleFunc returns 200 if the user has a signed session cookie.
func IsAuthenticatedHandleFunc(w http.ResponseWriter, req *http.Request) {
if IsAuthenticated(req) {
+ log.Println("auth Correct")
w.WriteHeader(http.StatusOK)
} else {
+ log.Println("auth incorrect")
w.WriteHeader(http.StatusUnauthorized)
}
}