mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
fix: instance remove (#4602)
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
proj_model "github.com/zitadel/zitadel/internal/project/model"
|
||||
project_es_model "github.com/zitadel/zitadel/internal/project/repository/eventsourcing/model"
|
||||
proj_view "github.com/zitadel/zitadel/internal/project/repository/view"
|
||||
"github.com/zitadel/zitadel/internal/repository/instance"
|
||||
"github.com/zitadel/zitadel/internal/repository/project"
|
||||
"github.com/zitadel/zitadel/internal/repository/user"
|
||||
user_repo "github.com/zitadel/zitadel/internal/repository/user"
|
||||
@@ -61,7 +62,7 @@ func (t *Token) Subscription() *v1.Subscription {
|
||||
}
|
||||
|
||||
func (_ *Token) AggregateTypes() []es_models.AggregateType {
|
||||
return []es_models.AggregateType{user.AggregateType, project.AggregateType}
|
||||
return []es_models.AggregateType{user.AggregateType, project.AggregateType, instance.AggregateType}
|
||||
}
|
||||
|
||||
func (p *Token) CurrentSequence(instanceID string) (uint64, error) {
|
||||
@@ -144,6 +145,8 @@ func (t *Token) Reduce(event *es_models.Event) (err error) {
|
||||
applicationsIDs = append(applicationsIDs, app.AppID)
|
||||
}
|
||||
return t.view.DeleteApplicationTokens(event, applicationsIDs...)
|
||||
case instance.InstanceRemovedEventType:
|
||||
return t.view.DeleteInstanceTokens(event)
|
||||
default:
|
||||
return t.view.ProcessedTokenSequence(event)
|
||||
}
|
||||
|
Reference in New Issue
Block a user