diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-03 13:08:47 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-03 13:08:47 +0200 |
commit | d33ba9ee675eedf47ce4a7977d116bf81dda5b2e (patch) | |
tree | d97d8e4ec67a474bc0e866b70e855dd56ac28321 | |
parent | dd6dc669fa232716cce0e2dbc5c4f7bd32296d66 (diff) | |
download | lens-d33ba9ee675eedf47ce4a7977d116bf81dda5b2e.tar.gz lens-d33ba9ee675eedf47ce4a7977d116bf81dda5b2e.tar.bz2 lens-d33ba9ee675eedf47ce4a7977d116bf81dda5b2e.zip |
fix: Fix initial setup check
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | pkg/ext/middleware.go | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -43,7 +43,7 @@ run: sass tmpl --log-level=$(LOG_LEVEL) \ --scheduler-count=$(SCHEDULER_COUNT) \ --cache-path="$(CACHE_PATH)" \ - --aes-key="$(AES_KEY)" + --aes-key=$(AES_KEY) sass: @mkdir -p static diff --git a/pkg/ext/middleware.go b/pkg/ext/middleware.go index 2cf70cf..061cf7c 100644 --- a/pkg/ext/middleware.go +++ b/pkg/ext/middleware.go @@ -111,9 +111,10 @@ func NewInitialSetupMiddleware(userRepository repository.UserRepository) *Initia func (i *InitialSetupMiddleware) Check(next http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { + // if user has been set to context it is logged in already token := GetTokenFromCtx(r) - if token == nil { + if token != nil { next(w, r) return } |