mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 10:37:32 +00:00
fix(smtp): enable default instance config (#7925)
* fix(smtp): enable default instance config * fix(smtp): enable default instance config * improve method signature
This commit is contained in:
@@ -306,7 +306,7 @@ func (c *Commands) getSMTPConfig(ctx context.Context, instanceID, id, domain str
|
||||
}
|
||||
|
||||
// TODO: SetUpInstance still uses this and would be removed as soon as deprecated PrepareCommands is removed
|
||||
func (c *Commands) prepareAddSMTPConfig(a *instance.Aggregate, description, from, name, replyTo, hostAndPort, user string, password []byte, tls bool) preparation.Validation {
|
||||
func (c *Commands) prepareAddAndActivateSMTPConfig(a *instance.Aggregate, description, from, name, replyTo, hostAndPort, user string, password []byte, tls bool) preparation.Validation {
|
||||
return func() (preparation.CreateCommands, error) {
|
||||
if from = strings.TrimSpace(from); from == "" {
|
||||
return nil, zerrors.ThrowInvalidArgument(nil, "INST-mruNY", "Errors.Invalid.Argument")
|
||||
@@ -358,6 +358,11 @@ func (c *Commands) prepareAddSMTPConfig(a *instance.Aggregate, description, from
|
||||
user,
|
||||
smtpPassword,
|
||||
),
|
||||
instance.NewSMTPConfigActivatedEvent(
|
||||
ctx,
|
||||
&a.Aggregate,
|
||||
id,
|
||||
),
|
||||
}, nil
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user