Skip to content

Commit

Permalink
fix(wire): entitlement disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hekike committed Dec 13, 2024
1 parent 328b5d7 commit d4d2c93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions app/common/entitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ func NewEntitlementRegistry(
return nil
}

if !entitlementConfig.Enabled {
return nil
}

return registrybuilder.GetEntitlementRegistry(registrybuilder.EntitlementOptions{
DatabaseClient: db,
StreamingConnector: streamingConnector,
Expand Down
7 changes: 6 additions & 1 deletion app/common/productcatalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ func NewFeatureConnector(logger *slog.Logger, db *entdb.Client, meterRepo meter.
return feature.NewFeatureConnector(featureRepo, meterRepo)
}

func NewPlanService(logger *slog.Logger, db *entdb.Client, productCatalogConf config.ProductCatalogConfiguration, featureConnector feature.FeatureConnector) (plan.Service, error) {
func NewPlanService(
logger *slog.Logger,
db *entdb.Client,
productCatalogConf config.ProductCatalogConfiguration,
featureConnector feature.FeatureConnector,
) (plan.Service, error) {
// TODO: remove this check after enabled by default
if db == nil {
return nil, nil
Expand Down

0 comments on commit d4d2c93

Please sign in to comment.