fix: use correct encryption keys in addHuman and set primary instance domain (#3486)

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
Livio Amstutz
2022-04-25 16:36:10 +02:00
committed by GitHub
parent 0b6eb07e2d
commit 7a507fe63c
5 changed files with 30 additions and 31 deletions

View File

@@ -68,9 +68,12 @@ func (c *Commands) RemoveInstanceDomain(ctx context.Context, instanceDomain stri
}, nil
}
func (c *Commands) addGeneratedInstanceDomain(ctx context.Context, a *instance.Aggregate, instanceName string) preparation.Validation {
func (c *Commands) addGeneratedInstanceDomain(ctx context.Context, a *instance.Aggregate, instanceName string) []preparation.Validation {
domain := domain.NewGeneratedInstanceDomain(instanceName, authz.GetInstance(ctx).RequestedDomain())
return c.addInstanceDomain(a, domain, true)
return []preparation.Validation{
c.addInstanceDomain(a, domain, true),
setPrimaryInstanceDomain(a, domain),
}
}
func (c *Commands) addInstanceDomain(a *instance.Aggregate, instanceDomain string, generated bool) preparation.Validation {