aboutsummaryrefslogtreecommitdiff
path: root/pkg/ext/middleware.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ext/middleware.go')
-rw-r--r--pkg/ext/middleware.go5
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 {