From b2d094d03b0c228dda42d3f830a398c1b9bc1972 Mon Sep 17 00:00:00 2001 From: taigacute <41671631+taigacute@users.noreply.github.com> Date: Wed, 10 Apr 2019 20:51:29 +0800 Subject: [PATCH] fix first login invalid user --- views/sessionViews.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/views/sessionViews.go b/views/sessionViews.go index e14a518..86df9a4 100644 --- a/views/sessionViews.go +++ b/views/sessionViews.go @@ -33,13 +33,7 @@ func LogoutFunc(w http.ResponseWriter, r *http.Request) { //LoginFunc implements the login functionality, will add a cookie to the cookie store for managing authentication func LoginFunc(w http.ResponseWriter, r *http.Request) { - session, err := sessions.Store.Get(r, "session") - - if err != nil { - log.Println("error identifying session") - loginTemplate.Execute(w, nil) - return - } + session, _ := sessions.Store.Get(r, "session") switch r.Method { case "GET":