mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 11:27:33 +00:00
fix: all enums same style (#262)
* fix: all enums same style * fix: rename process to reduce * add some missing enum renaming Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ type Notification struct {
|
||||
|
||||
const (
|
||||
notificationTable = "notification.notifications"
|
||||
NOTIFY_USER = "NOTIFICATION"
|
||||
NotifyUserID = "NOTIFICATION"
|
||||
)
|
||||
|
||||
func (n *Notification) MinimumCycleDuration() time.Duration { return n.cycleDuration }
|
||||
@@ -49,7 +49,7 @@ func (n *Notification) EventQuery() (*models.SearchQuery, error) {
|
||||
return eventsourcing.UserQuery(sequence), nil
|
||||
}
|
||||
|
||||
func (n *Notification) Process(event *models.Event) (err error) {
|
||||
func (n *Notification) Reduce(event *models.Event) (err error) {
|
||||
switch event.Type {
|
||||
case es_model.InitializedUserCodeAdded:
|
||||
err = n.handleInitUserCode(event)
|
||||
@@ -168,5 +168,5 @@ func (n *Notification) OnError(event *models.Event, err error) error {
|
||||
}
|
||||
|
||||
func getSetNotifyContextData(orgID string) context.Context {
|
||||
return auth.SetCtxData(context.Background(), auth.CtxData{UserID: NOTIFY_USER, OrgID: orgID})
|
||||
return auth.SetCtxData(context.Background(), auth.CtxData{UserID: NotifyUserID, OrgID: orgID})
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ func (p *NotifyUser) EventQuery() (*models.SearchQuery, error) {
|
||||
return eventsourcing.UserQuery(sequence), nil
|
||||
}
|
||||
|
||||
func (p *NotifyUser) Process(event *models.Event) (err error) {
|
||||
func (p *NotifyUser) Reduce(event *models.Event) (err error) {
|
||||
user := new(view_model.NotifyUser)
|
||||
switch event.Type {
|
||||
case es_model.UserAdded,
|
||||
|
Reference in New Issue
Block a user