Skip to content

Commit

Permalink
fix first login invalid user
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Apr 10, 2019
1 parent 6088493 commit b2d094d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions views/sessionViews.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit b2d094d

Please sign in to comment.