feat: update some errorhandling #161
This commit is contained in:
@@ -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
|
||||
// }
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user