mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 20:08:02 +00:00
f1fa74a2c0
* fix: loginnames in login and mails (eventstore v1 queries) * fix: loginnames in login and mails (eventstore v1 queries)
21 lines
612 B
Go
21 lines
612 B
Go
package view
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/errors"
|
|
es_models "github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
"github.com/zitadel/zitadel/internal/repository/org"
|
|
)
|
|
|
|
func OrgByIDQuery(id, instanceID string, latestSequence uint64) (*es_models.SearchQuery, error) {
|
|
if id == "" {
|
|
return nil, errors.ThrowPreconditionFailed(nil, "EVENT-dke74", "id should be filled")
|
|
}
|
|
return es_models.NewSearchQuery().
|
|
AddQuery().
|
|
AggregateTypeFilter(org.AggregateType).
|
|
LatestSequenceFilter(latestSequence).
|
|
InstanceIDFilter(instanceID).
|
|
AggregateIDFilter(id).
|
|
SearchQuery(), nil
|
|
}
|