From 786c4d2cd0860032e2624cadbbf54891d4269ae2 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 25 Apr 2025 15:36:04 -0600 Subject: refactor: move key pacakge to cfg --- app/controllers/sparkles/controller_test.go | 4 ++-- app/controllers/sparkles/init.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/controllers/sparkles') diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go index 21f4ec7..c158f32 100644 --- a/app/controllers/sparkles/controller_test.go +++ b/app/controllers/sparkles/controller_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/xlgmokha/x/pkg/serde" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/db" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/key" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test" ) @@ -58,7 +58,7 @@ func TestSparkles(t *testing.T) { "/sparkles", test.WithAcceptHeader(serde.JSON), test.WithContentType(sparkle, serde.JSON), - test.WithContextKeyValue(t.Context(), key.CurrentUser, currentUser), + test.WithContextKeyValue(t.Context(), cfg.CurrentUser, currentUser), ) mux.ServeHTTP(response, request) diff --git a/app/controllers/sparkles/init.go b/app/controllers/sparkles/init.go index 2586c9a..1118a09 100644 --- a/app/controllers/sparkles/init.go +++ b/app/controllers/sparkles/init.go @@ -6,8 +6,8 @@ import ( "github.com/xlgmokha/x/pkg/log" "github.com/xlgmokha/x/pkg/mapper" "github.com/xlgmokha/x/pkg/serde" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/key" ) func init() { @@ -16,7 +16,7 @@ func init() { if err != nil { log.WithFields(r.Context(), log.Fields{"error": err}) } - sparkle.Author = key.CurrentUser.From(r.Context()) + sparkle.Author = cfg.CurrentUser.From(r.Context()) return sparkle }) } -- cgit v1.2.3