Skip to content

Commit

Permalink
refactored request for enabled features
Browse files Browse the repository at this point in the history
  • Loading branch information
hpoettker committed Jan 16, 2021
1 parent eb4ef29 commit 805f31b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following commands are available:
$ npm start

# Run the unit tests
$ ng test --single-run
$ ng test --watch=false

# Run lint
$ ng lint
Expand Down
8 changes: 3 additions & 5 deletions ui/src/app/shared/component/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ export class SearchComponent implements OnInit {
}

ngOnInit(): void {
this.aboutService.getAbout()
.subscribe((about: AboutState) => {
this.enabled.streams = about.features.streams;
this.enabled.tasks = about.features.tasks;
});
this.aboutService.isFeatureEnabled('streams').then(enabled => this.enabled.streams = enabled);
this.aboutService.isFeatureEnabled('tasks').then(enabled => this.enabled.tasks = enabled);

this.search.valueChanges
.pipe(
map(val => {
Expand Down

0 comments on commit 805f31b

Please sign in to comment.