forked from OrgGo/Tasks
Merge pull request #40 from taigacute/master
fix first login invalid user
This commit is contained in:
commit
8511199f45
|
@ -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
|
//LoginFunc implements the login functionality, will add a cookie to the cookie store for managing authentication
|
||||||
func LoginFunc(w http.ResponseWriter, r *http.Request) {
|
func LoginFunc(w http.ResponseWriter, r *http.Request) {
|
||||||
session, err := sessions.Store.Get(r, "session")
|
session, _ := sessions.Store.Get(r, "session")
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println("error identifying session")
|
|
||||||
loginTemplate.Execute(w, nil)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
switch r.Method {
|
switch r.Method {
|
||||||
case "GET":
|
case "GET":
|
||||||
|
|
Loading…
Reference in New Issue