# HG changeset patch # User Sascha L. Teichmann # Date 1543073362 -3600 # Node ID 450f5d0f5fe79cb5a9af3ad9596887cfd00fecb7 # Parent 50dd4ff7907eb3c5c35215c58798b3ab192fcafe Cosmetics. diff -r 50dd4ff7907e -r 450f5d0f5fe7 pkg/auth/middleware.go --- a/pkg/auth/middleware.go Sat Nov 24 16:22:28 2018 +0100 +++ b/pkg/auth/middleware.go Sat Nov 24 16:29:22 2018 +0100 @@ -65,8 +65,7 @@ func SessionChecker(next http.Handler, check func(*Session) bool) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { - claims, ok := GetSession(req) - if !ok || !check(claims) { + if claims, ok := GetSession(req); !ok || !check(claims) { http.Error(rw, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) return }