Skip to content

Commit

Permalink
Merge pull request #4896 from owncloud/disable-activities
Browse files Browse the repository at this point in the history
disable activities app by default
  • Loading branch information
kobergj authored Oct 26, 2022
2 parents 2eda183 + 766ab46 commit 60762a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions services/experimental/pkg/config/activities.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

// Activities defines the available activities configuration.
type Activities struct {
Enabled bool `yaml:"enabled" env:"EXPERIMENTAL_ACTIVITIES_ENABLED" desc:"enable activities app."`
Storage ActivitiesStorage `yaml:"storage" env:"EXPERIMENTAL_ACTIVITIES_STORAGE" desc:"activities storage."`
}

Expand Down
7 changes: 5 additions & 2 deletions services/experimental/pkg/service/http/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ func NewService(opts ...Option) (Experimental, error) {
logger,
)

if err := activities.NewActivitiesService(r, bus, logger, cfg.Activities); err != nil {
return svc, err
if cfg.Activities.Enabled {
err := activities.NewActivitiesService(r, bus, logger, cfg.Activities)
if err != nil {
return svc, err
}
}

r.Mount(cfg.HTTP.Root, r)
Expand Down

0 comments on commit 60762a3

Please sign in to comment.