fix: key pair query for newer events (#2165)

This commit is contained in:
Livio Amstutz 2021-08-11 07:55:16 +02:00 committed by GitHub
parent 8609ced24b
commit 272e411e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,14 +2,13 @@ package view
import (
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/repository/iam"
"github.com/caos/zitadel/internal/repository/keypair"
)
func KeyPairQuery(latestSequence uint64) *eventstore.SearchQueryBuilder {
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
AddQuery().
AggregateTypes(iam.AggregateType).
AggregateTypes(keypair.AggregateType).
SequenceGreater(latestSequence).
EventTypes(keypair.AddedEventType).
Builder()