fix: custom message texts (#2046)

* fix: grpc implementation of custom message texts

* fix: proto definition of RemoveHumanAvatar in mgmt api

* fix: DeleteCustomText in view (respect key)
This commit is contained in:
Livio Amstutz
2021-07-20 11:40:53 +02:00
committed by GitHub
parent 9413fc19ff
commit 413ed80611
12 changed files with 20 additions and 17 deletions

View File

@@ -2,6 +2,7 @@ package handler
import (
"github.com/caos/logging"
caos_errs "github.com/caos/zitadel/internal/errors"
"github.com/caos/zitadel/internal/eventstore/v1"
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
@@ -105,7 +106,7 @@ func (m *CustomText) processCustomText(event *es_models.Event) (err error) {
if err != nil {
return err
}
return m.view.DeleteCustomText(event.AggregateID, text.Template, text.Language, event)
return m.view.DeleteCustomText(event.AggregateID, text.Template, text.Language, text.Key, event)
default:
return m.view.ProcessedCustomTextSequence(event)
}

View File

@@ -32,8 +32,8 @@ func (v *View) PutCustomText(template *model.CustomTextView, event *models.Event
return v.ProcessedCustomTextSequence(event)
}
func (v *View) DeleteCustomText(aggregateID, textType, lang string, event *models.Event) error {
err := view.DeleteCustomText(v.Db, customTextTable, aggregateID, textType, lang)
func (v *View) DeleteCustomText(aggregateID, textType, lang, key string, event *models.Event) error {
err := view.DeleteCustomText(v.Db, customTextTable, aggregateID, textType, lang, key)
if err != nil && !errors.IsNotFound(err) {
return err
}