Merge pull request #40 from taigacute/master

fix first login invalid user
This commit is contained in:
Suraj Patil 2019-04-17 08:48:48 +05:30 committed by GitHub
commit 8511199f45
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":