Skip to content

Commit

Permalink
feature: #270 made the default projection a pointer on the API container
Browse files Browse the repository at this point in the history
  • Loading branch information
akeemphilbert committed Jul 22, 2023
1 parent 2da7053 commit ceac6b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/rest/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type RESTAPI struct {
gormConnection *gorm.DB
enforcers map[string]*casbin.Enforcer
entityRepositories map[string]model.EntityRepository
defaultProjection model.Projection
defaultProjection *projections.GORMDB
}

//define an interface that all plugins must implement
Expand Down Expand Up @@ -206,7 +206,7 @@ func (p *RESTAPI) RegisterCommandDispatcher(name string, dispatcher model.Comman

//RegisterProjection Add command dispatcher so that it can be referenced in the OpenAPI spec
func (p *RESTAPI) RegisterProjection(name string, projection model.Projection) {
p.defaultProjection = projection
p.defaultProjection = projection.(*projections.GORMDB)
}

//RegisterEntityFactory Adds entity factory so that it can be referenced in the OpenAPI spec
Expand Down

0 comments on commit ceac6b4

Please sign in to comment.