No session existing is not an error; fixed

This commit is contained in:
Jason Streifling 2024-10-04 10:12:35 +02:00
parent 202d04f323
commit cf4d4f151a

View File

@ -1,7 +1,6 @@
package frontend
import (
"errors"
"fmt"
"html/template"
"log"
@ -41,7 +40,6 @@ func getSession(w http.ResponseWriter, r *http.Request, c *b.Config, s *b.Cookie
session := &b.Session{Session: *tmpSession}
if session.IsNew {
template.Must(tmpl, tmplErr).ExecuteTemplate(w, "page-content", msg)
return session, errors.New("error: no existing session")
}
return session, nil