Remove useless encryption key injections

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-10 20:00:05 +04:00
parent 3a727f53fa
commit 87415c0324
18 changed files with 42 additions and 103 deletions

View File

@@ -122,7 +122,7 @@ func (s *CustomDomainService) DeleteCustomDomain(
}
domain := &coredata.CustomDomain{}
if err := domain.LoadByID(ctx, tx, s.svc.scope, s.encryptionKey, *org.CustomDomainID); err != nil {
if err := domain.LoadByID(ctx, tx, s.svc.scope, *org.CustomDomainID); err != nil {
return fmt.Errorf("cannot load domain: %w", err)
}
@@ -159,7 +159,7 @@ func (s *CustomDomainService) GetOrganizationCustomDomain(
}
domain = &coredata.CustomDomain{}
if err := domain.LoadByID(ctx, conn, s.svc.scope, s.encryptionKey, *org.CustomDomainID); err != nil {
if err := domain.LoadByID(ctx, conn, s.svc.scope, *org.CustomDomainID); err != nil {
return fmt.Errorf("cannot load custom domain: %w", err)
}

View File

@@ -399,7 +399,7 @@ func (s *Service) LoadOrganizationByDomain(ctx context.Context, domain string) (
ctx,
func(conn pg.Conn) error {
var customDomain coredata.CustomDomain
if err := customDomain.LoadByDomain(ctx, conn, coredata.NewNoScope(), s.encryptionKey, domain); err != nil {
if err := customDomain.LoadByDomain(ctx, conn, coredata.NewNoScope(), domain); err != nil {
return fmt.Errorf("cannot load custom domain: %w", err)
}

View File

@@ -617,7 +617,7 @@ func (s *TrustCenterService) EmailPresenterConfig(ctx context.Context, complianc
}
customDomain = &coredata.CustomDomain{}
if err := customDomain.LoadByOrganizationID(ctx, conn, scope, s.svc.encryptionKey, organization.ID); err != nil {
if err := customDomain.LoadByOrganizationID(ctx, conn, scope, organization.ID); err != nil {
if !errors.Is(err, coredata.ErrResourceNotFound) {
return fmt.Errorf("cannot load custom domain: %w", err)
}