No session existing is not an error; fixed
This commit is contained in:
parent
202d04f323
commit
cf4d4f151a
@ -1,7 +1,6 @@
|
|||||||
package frontend
|
package frontend
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"log"
|
"log"
|
||||||
@ -41,7 +40,6 @@ func getSession(w http.ResponseWriter, r *http.Request, c *b.Config, s *b.Cookie
|
|||||||
session := &b.Session{Session: *tmpSession}
|
session := &b.Session{Session: *tmpSession}
|
||||||
if session.IsNew {
|
if session.IsNew {
|
||||||
template.Must(tmpl, tmplErr).ExecuteTemplate(w, "page-content", msg)
|
template.Must(tmpl, tmplErr).ExecuteTemplate(w, "page-content", msg)
|
||||||
return session, errors.New("error: no existing session")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return session, nil
|
return session, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user