mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-06 13:07:52 +00:00
fix(projection): correct type cast of user grant reactivated (#7123)
* fix(projection): correct type cast of user grant reactivated * test: correct mapper
This commit is contained in:
parent
45ccdcfa99
commit
6d3ce8d5ab
@ -285,7 +285,7 @@ func (p *userGrantProjection) reduceDeactivated(event eventstore.Event) (*handle
|
||||
}
|
||||
|
||||
func (p *userGrantProjection) reduceReactivated(event eventstore.Event) (*handler.Statement, error) {
|
||||
if _, ok := event.(*usergrant.UserGrantDeactivatedEvent); !ok {
|
||||
if _, ok := event.(*usergrant.UserGrantReactivatedEvent); !ok {
|
||||
return nil, zerrors.ThrowInvalidArgumentf(nil, "PROJE-DGsKh", "reduce.wrong.event.type %s", usergrant.UserGrantReactivatedType)
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ func TestUserGrantProjection_reduces(t *testing.T) {
|
||||
usergrant.UserGrantReactivatedType,
|
||||
usergrant.AggregateType,
|
||||
nil,
|
||||
), usergrant.UserGrantDeactivatedEventMapper),
|
||||
), usergrant.UserGrantReactivatedEventMapper),
|
||||
},
|
||||
reduce: (&userGrantProjection{}).reduceReactivated,
|
||||
want: wantReduce{
|
||||
|
Loading…
x
Reference in New Issue
Block a user