From e6ae25d08152950338677190cbdf65d3ba00af8f Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Fri, 26 May 2023 18:46:55 +1000 Subject: [PATCH] Remove debug logs --- backend/internal/api/handler/certificates.go | 1 - backend/internal/api/middleware/auth.go | 1 - backend/internal/jwt/keys_db.go | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/backend/internal/api/handler/certificates.go b/backend/internal/api/handler/certificates.go index 014c592a..7fc1caf2 100644 --- a/backend/internal/api/handler/certificates.go +++ b/backend/internal/api/handler/certificates.go @@ -39,7 +39,6 @@ func GetCertificates() func(http.ResponseWriter, *http.Request) { // Route: GET /certificates/{certificateID} func GetCertificate() func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { - logger.Debug("here") if item := getCertificateFromRequest(w, r); item != nil { // nolint: errcheck,gosec item.Expand(getExpandFromContext(r)) diff --git a/backend/internal/api/middleware/auth.go b/backend/internal/api/middleware/auth.go index 6f581ed0..7ca8c7ed 100644 --- a/backend/internal/api/middleware/auth.go +++ b/backend/internal/api/middleware/auth.go @@ -44,7 +44,6 @@ func Enforce(permission string) func(http.Handler) http.Handler { token, claims, err := jwtauth.FromContext(ctx) if err != nil { - logger.Debug("EnforceError: %+v", err) h.ResultErrorJSON(w, r, http.StatusUnauthorized, err.Error(), nil) return } diff --git a/backend/internal/jwt/keys_db.go b/backend/internal/jwt/keys_db.go index 45961e7e..f00e727d 100644 --- a/backend/internal/jwt/keys_db.go +++ b/backend/internal/jwt/keys_db.go @@ -3,7 +3,6 @@ package jwt import ( "npm/internal/database" "npm/internal/entity" - "npm/internal/logger" ) var currentKeys KeysModel @@ -48,7 +47,6 @@ func LoadKeys() error { return err } } - logger.Debug("private: %s", currentKeys.PrivateKey) - logger.Debug("public: %s", currentKeys.PublicKey) + return nil }