mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-16 15:14:59 +00:00
use global id generator (#142)
* use global id generator * remove duplicate `UserRemoved` Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -2,8 +2,6 @@ package eventsourcing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/caos/zitadel/internal/api/auth"
|
||||
caos_errs "github.com/caos/zitadel/internal/errors"
|
||||
es_sdk "github.com/caos/zitadel/internal/eventstore/sdk"
|
||||
@@ -42,11 +40,11 @@ func (es *PolicyEventstore) CreatePasswordComplexityPolicy(ctx context.Context,
|
||||
return nil, caos_errs.ThrowPreconditionFailed(nil, "EVENT-yDJ5I", "Policy allready exists")
|
||||
}
|
||||
|
||||
id, err := idGenerator.NextID()
|
||||
id, err := es.idGenerator.Next()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
policy.AggregateID = strconv.FormatUint(id, 10)
|
||||
policy.AggregateID = id
|
||||
|
||||
repoPolicy := PasswordComplexityPolicyFromModel(policy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user