mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-01 00:18:51 +00:00
fix: commandside queries (#1313)
* fix: move user by id to query side * fix: move get passwordless to query side # Conflicts: # internal/user/repository/eventsourcing/eventstore.go * fix: move get passwordless to query side * remove user eventstore * remove unused models * org changes * org changes * fix: move org queries to query side * fix: remove org eventstore * fix: remove org eventstore * fix: remove org eventstore * remove project from es v1 * project cleanup * project cleanup * fix: remove org eventstore * fix: remove iam eventstore Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
@@ -3,6 +3,7 @@ package handler
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/caos/zitadel/internal/user/repository/view"
|
||||
"github.com/caos/zitadel/internal/user/repository/view/model"
|
||||
view_model "github.com/caos/zitadel/internal/user/repository/view/model"
|
||||
"github.com/caos/zitadel/internal/v2/command"
|
||||
@@ -24,7 +25,6 @@ import (
|
||||
iam_model "github.com/caos/zitadel/internal/iam/model"
|
||||
iam_es_model "github.com/caos/zitadel/internal/iam/repository/view/model"
|
||||
"github.com/caos/zitadel/internal/notification/types"
|
||||
usr_event "github.com/caos/zitadel/internal/user/repository/eventsourcing"
|
||||
es_model "github.com/caos/zitadel/internal/user/repository/eventsourcing/model"
|
||||
)
|
||||
|
||||
@@ -47,7 +47,6 @@ const (
|
||||
type Notification struct {
|
||||
handler
|
||||
command *command.CommandSide
|
||||
userEvents *usr_event.UserEventstore
|
||||
systemDefaults sd.SystemDefaults
|
||||
AesCrypto crypto.EncryptionAlgorithm
|
||||
i18n *i18n.Translator
|
||||
@@ -58,7 +57,6 @@ type Notification struct {
|
||||
func newNotification(
|
||||
handler handler,
|
||||
command *command.CommandSide,
|
||||
userEvents *usr_event.UserEventstore,
|
||||
defaults sd.SystemDefaults,
|
||||
aesCrypto crypto.EncryptionAlgorithm,
|
||||
translator *i18n.Translator,
|
||||
@@ -67,7 +65,6 @@ func newNotification(
|
||||
h := &Notification{
|
||||
handler: handler,
|
||||
command: command,
|
||||
userEvents: userEvents,
|
||||
systemDefaults: defaults,
|
||||
i18n: translator,
|
||||
statikDir: statikDir,
|
||||
@@ -109,7 +106,7 @@ func (n *Notification) EventQuery() (*models.SearchQuery, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return usr_event.UserQuery(sequence.CurrentSequence), nil
|
||||
return view.UserQuery(sequence.CurrentSequence), nil
|
||||
}
|
||||
|
||||
func (n *Notification) Reduce(event *models.Event) (err error) {
|
||||
@@ -331,7 +328,7 @@ func (n *Notification) checkIfAlreadyHandled(userID string, sequence uint64, eve
|
||||
}
|
||||
|
||||
func (n *Notification) getUserEvents(userID string, sequence uint64) ([]*models.Event, error) {
|
||||
query, err := usr_event.UserByIDQuery(userID, sequence)
|
||||
query, err := view.UserByIDQuery(userID, sequence)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user