fix(adminAPI): localize event type (#5059)

* fix(adminAPI): localisation of event types, aggregate types
* fix(adminAPI): validations of ListEvent request
* implement caching of editor user information
This commit is contained in:
Silvan
2023-01-19 16:50:05 +01:00
committed by GitHub
parent a3f5885823
commit 7b5135e637
16 changed files with 679 additions and 115 deletions

View File

@@ -254,7 +254,7 @@ func (es *Eventstore) RegisterFilterEventMapper(aggregateType AggregateType, eve
func (es *Eventstore) appendEventType(typ EventType) {
i := sort.SearchStrings(es.eventTypes, string(typ))
if i > 0 && es.eventTypes[i-1] == string(typ) {
if i < len(es.eventTypes) && es.eventTypes[i] == string(typ) {
return
}
es.eventTypes = append(es.eventTypes[:i], append([]string{string(typ)}, es.eventTypes[i:]...)...)