fix first login invalid user

This commit is contained in:
taigacute 2019-04-10 20:51:29 +08:00 committed by GitHub
parent 6088493ff5
commit b2d094d03b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -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":