feat: update some errorhandling #161
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s

This commit is contained in:
Tim
2024-09-10 12:13:10 +02:00
parent 076eee4436
commit f4d0a15644
7 changed files with 99 additions and 45 deletions

View File

@@ -22,7 +22,7 @@ func EnsureValidSession(db *sql.DB, next http.Handler) http.Handler {
// }
user := utils.GetUserFromSession(db, r)
if user == nil || !user.SessionValid {
if user == nil {
utils.DoRedirect(w, r, "/auth/signin")
return
}
@@ -45,7 +45,7 @@ func EnsureValidSession(db *sql.DB, next http.Handler) http.Handler {
//
// sessionId := getSessionID(r)
// user := verifySession(db, sessionId)
// if user == nil || !user.SessionValid {
// if user == nil {
// return true, false
// }
//