refactor: remove commandNew struct (#3465)

* refactor: remove commandNew struct

* requested fixes
This commit is contained in:
Livio Amstutz
2022-04-20 16:59:37 +02:00
committed by GitHub
parent 1305c14e49
commit a7816a43b1
60 changed files with 2073 additions and 2262 deletions

View File

@@ -20,7 +20,7 @@ func (c *Commands) AddSMTPConfig(ctx context.Context, instanceID string, config
}
var smtpPassword *crypto.CryptoValue
if config.SMTP.Password != "" {
smtpPassword, err = crypto.Encrypt([]byte(config.SMTP.Password), c.smtpPasswordCrypto)
smtpPassword, err = crypto.Encrypt([]byte(config.SMTP.Password), c.smtpEncryption)
if err != nil {
return nil, err
}
@@ -90,7 +90,7 @@ func (c *Commands) ChangeSMTPConfigPassword(ctx context.Context, instanceID, pas
return nil, caos_errs.ThrowNotFound(nil, "COMMAND-3n9ls", "Errors.SMTPConfig.NotFound")
}
iamAgg := InstanceAggregateFromWriteModel(&smtpConfigWriteModel.WriteModel)
newPW, err := crypto.Encrypt([]byte(password), c.smtpPasswordCrypto)
newPW, err := crypto.Encrypt([]byte(password), c.smtpEncryption)
if err != nil {
return nil, err
}