fix scheduled pseudo event projection

This commit is contained in:
Elio Bischof
2023-06-28 17:43:19 +02:00
parent ec8b587ba6
commit 2b8dac40de
9 changed files with 42 additions and 29 deletions

View File

@@ -1,6 +1,9 @@
package milestone
import (
"context"
"github.com/zitadel/zitadel/internal/api/authz"
"github.com/zitadel/zitadel/internal/eventstore"
)
@@ -13,13 +16,14 @@ type Aggregate struct {
eventstore.Aggregate
}
func NewAggregate(id, resourceOwner, instanceID string) *Aggregate {
func NewAggregate(ctx context.Context, id string) *Aggregate {
instanceID := authz.GetInstance(ctx).InstanceID()
return &Aggregate{
Aggregate: eventstore.Aggregate{
Type: AggregateType,
Version: AggregateVersion,
ID: id,
ResourceOwner: resourceOwner,
ResourceOwner: instanceID,
InstanceID: instanceID,
},
}