fixed autoLogout

This commit is contained in:
2025-04-24 17:48:03 +02:00
parent b7171d77c7
commit 9918c43527
2 changed files with 5 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import (
"arbeitszeitmessung/models"
"encoding/json"
"fmt"
"log"
"net/http"
)
@@ -29,8 +30,9 @@ func autoLogout(w http.ResponseWriter) {
err = user.Logout()
if err != nil {
fmt.Printf("Error logging out user %v\n", err)
}else {
logged_out_users = append(logged_out_users, user)
} else {
logged_out_users = append(logged_out_users, user)
log.Printf("Automaticaly logged out user %s, %s ", user.Name, user.Vorname)
}
}