From d33ba9ee675eedf47ce4a7977d116bf81dda5b2e Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 3 Sep 2023 13:08:47 +0200 Subject: fix: Fix initial setup check --- pkg/ext/middleware.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/ext') 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 } -- cgit v1.2.3