diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-12-01 00:52:33 +0100 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-12-01 00:52:33 +0100 |
commit | 29e9fd3136f2e2fe301cbe07967fb3bb4ffcee2a (patch) | |
tree | cf5248dc0c3efd21845062d4885ed0dd0890d9cb /pkg/ext/middleware.go | |
parent | 417041797674319485bea96cb38489670ff3b2ef (diff) | |
download | lens-master.tar.gz lens-master.tar.bz2 lens-master.zip |
This is done until go1.21 hits alpine repository.
Diffstat (limited to 'pkg/ext/middleware.go')
-rw-r--r-- | pkg/ext/middleware.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/ext/middleware.go b/pkg/ext/middleware.go index 38bacca..d9f06e1 100644 --- a/pkg/ext/middleware.go +++ b/pkg/ext/middleware.go @@ -4,10 +4,11 @@ import ( "context" "encoding/base64" "errors" - "log/slog" "net/http" "time" + "golang.org/x/exp/slog" + "git.sr.ht/~gabrielgio/img/pkg/database/repository" "git.sr.ht/~gabrielgio/img/pkg/service" ) @@ -47,7 +48,6 @@ func (l *LogMiddleware) HTTP(next http.HandlerFunc) http.HandlerFunc { slog.Duration("elapsed", elapsed), slog.String("path", r.URL.Path), ) - } } @@ -135,7 +135,6 @@ 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 := GetUserFromCtx(r) if token != nil { |