Remove useless encryption key injections
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user