mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-01 00:18:51 +00:00
append events without return value
This commit is contained in:
@@ -142,7 +142,7 @@ type reducer interface {
|
||||
// it only appends the newly added events
|
||||
Reduce() error
|
||||
//AppendEvents appends the passed events to an internal list of events
|
||||
AppendEvents(...EventReader) error
|
||||
AppendEvents(...EventReader)
|
||||
}
|
||||
|
||||
//FilterToReducer filters the events based on the search query, appends all events to the reducer and calls it's reduce function
|
||||
@@ -151,9 +151,8 @@ func (es *Eventstore) FilterToReducer(ctx context.Context, searchQuery *SearchQu
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = r.AppendEvents(events...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r.AppendEvents(events...)
|
||||
|
||||
return r.Reduce()
|
||||
}
|
||||
@@ -180,9 +179,7 @@ func (es *Eventstore) FilterToQueryReducer(ctx context.Context, r queryReducer)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = r.AppendEvents(events...); err != nil {
|
||||
return err
|
||||
}
|
||||
r.AppendEvents(events...)
|
||||
|
||||
return r.Reduce()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user