mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
fix: editorname (#281)
* feat: editorname on changes * feat: editorname on changes * feat: editorname on changes * feat: editorname on changes * fix: tests * fix: tests
This commit is contained in:
@@ -20,11 +20,12 @@ type ApplicationChanges struct {
|
||||
}
|
||||
|
||||
type ApplicationChange struct {
|
||||
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
|
||||
EventType string `json:"eventType,omitempty"`
|
||||
Sequence uint64 `json:"sequence,omitempty"`
|
||||
Modifier string `json:"modifierUser,omitempty"`
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
|
||||
EventType string `json:"eventType,omitempty"`
|
||||
Sequence uint64 `json:"sequence,omitempty"`
|
||||
ModifierId string `json:"modifierUser,omitempty"`
|
||||
ModifierName string `json:"-"`
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AppState int32
|
||||
|
@@ -21,11 +21,12 @@ type ProjectChanges struct {
|
||||
}
|
||||
|
||||
type ProjectChange struct {
|
||||
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
|
||||
EventType string `json:"eventType,omitempty"`
|
||||
Sequence uint64 `json:"sequence,omitempty"`
|
||||
Modifier string `json:"modifierUser,omitempty"`
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
|
||||
EventType string `json:"eventType,omitempty"`
|
||||
Sequence uint64 `json:"sequence,omitempty"`
|
||||
ModifierId string `json:"modifierUser,omitempty"`
|
||||
ModifierName string `json:"-"`
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ProjectState int32
|
||||
|
@@ -380,7 +380,7 @@ func (es *ProjectEventstore) ProjectChanges(ctx context.Context, id string, last
|
||||
change := &proj_model.ProjectChange{
|
||||
ChangeDate: creationDate,
|
||||
EventType: u.Type.String(),
|
||||
Modifier: u.EditorUser,
|
||||
ModifierId: u.EditorUser,
|
||||
Sequence: u.Sequence,
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ func (es *ProjectEventstore) ApplicationChanges(ctx context.Context, id string,
|
||||
change := &proj_model.ApplicationChange{
|
||||
ChangeDate: creationDate,
|
||||
EventType: u.Type.String(),
|
||||
Modifier: u.EditorUser,
|
||||
ModifierId: u.EditorUser,
|
||||
Sequence: u.Sequence,
|
||||
}
|
||||
appendChanges := true
|
||||
|
@@ -2604,7 +2604,7 @@ func TestChangesProject(t *testing.T) {
|
||||
limit: 0,
|
||||
},
|
||||
res: res{
|
||||
changes: &model.ProjectChanges{Changes: []*model.ProjectChange{&model.ProjectChange{EventType: "", Sequence: 1, Modifier: ""}}, LastSequence: 1},
|
||||
changes: &model.ProjectChanges{Changes: []*model.ProjectChange{&model.ProjectChange{EventType: "", Sequence: 1, ModifierId: ""}}, LastSequence: 1},
|
||||
project: &model.Project{Name: "MusterProject"},
|
||||
},
|
||||
},
|
||||
@@ -2673,7 +2673,7 @@ func TestChangesApplication(t *testing.T) {
|
||||
limit: 0,
|
||||
},
|
||||
res: res{
|
||||
changes: &model.ApplicationChanges{Changes: []*model.ApplicationChange{&model.ApplicationChange{EventType: "", Sequence: 1, Modifier: ""}}, LastSequence: 1},
|
||||
changes: &model.ApplicationChanges{Changes: []*model.ApplicationChange{&model.ApplicationChange{EventType: "", Sequence: 1, ModifierId: ""}}, LastSequence: 1},
|
||||
app: &model.Application{Name: "MusterApp", AppID: "AppId", Type: 3},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user