Audit changes.

This commit is contained in:
jdl
2026-06-13 18:03:44 +02:00
parent 0cd5982a3f
commit 8983c0d651
4 changed files with 19 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ func (app *App) handlePub(pattern string, fn handlerFunc) {
func (app *App) handleNotSignedIn(pattern string, fn handlerFunc) {
app.handlePub(pattern, func(s *api.Session, w http.ResponseWriter, r *http.Request) error {
if s.SignedIn {
if s.SessionID != "" {
http.Redirect(w, r, "/", http.StatusSeeOther)
return nil
}
@@ -45,7 +45,7 @@ func (app *App) handleNotSignedIn(pattern string, fn handlerFunc) {
func (app *App) handleSignedIn(pattern string, fn handlerFunc) {
app.handlePub(pattern, func(s *api.Session, w http.ResponseWriter, r *http.Request) error {
if !s.SignedIn {
if s.SessionID == "" {
http.Redirect(w, r, "/", http.StatusSeeOther)
return nil
}