fix: app by id, views with computed objects (#583)

* feat: read app by id if my events

* fix: handlers if no sublist

* fix: removed app

* fix: removed project

* fix: removed app

* fix: removed app

* fix: app by id with projectid
This commit is contained in:
Fabi
2020-08-13 08:28:18 +02:00
committed by GitHub
parent 2f404be7c6
commit 5c4fef296f
18 changed files with 71 additions and 14 deletions

View File

@@ -44,7 +44,7 @@ func (p *Application) Reduce(event *models.Event) (err error) {
if err != nil {
return err
}
app, err = p.view.ApplicationByID(app.ID)
app, err = p.view.ApplicationByID(event.AggregateID, app.ID)
if err != nil {
return err
}

View File

@@ -11,8 +11,8 @@ const (
applicationTable = "authz.applications"
)
func (v *View) ApplicationByID(appID string) (*model.ApplicationView, error) {
return view.ApplicationByID(v.Db, applicationTable, appID)
func (v *View) ApplicationByID(projectID, appID string) (*model.ApplicationView, error) {
return view.ApplicationByID(v.Db, applicationTable, projectID, appID)
}
func (v *View) ApplicationByOIDCClientID(clientID string) (*model.ApplicationView, error) {