diff --git a/api/middleware/middleware.go b/api/middleware/middleware.go index 7514b5a..bc52b05 100644 --- a/api/middleware/middleware.go +++ b/api/middleware/middleware.go @@ -168,10 +168,10 @@ func AuthMiddleware(options AuthMiddlewareOptions) func(http.Handler) http.Handl } } + } - if unauthorized { - http.Error(w, err.Error(), http.StatusInternalServerError) - } + if unauthorized { + http.Error(w, err.Error(), http.StatusInternalServerError) } return }