File tree 2 files changed +3
-5
lines changed
shared/services/classifications
store/classification-store 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,11 @@ export interface CategoriesResponse { [key: string]: string[] }
15
15
16
16
@Injectable ( )
17
17
export class ClassificationCategoriesService {
18
- private mainUrl = environment . taskanaRestUrl ;
19
- private urlCategoriesByType = `${ this . mainUrl } /v1/classifications-by-type` ;
20
-
21
18
constructor ( private httpClient : HttpClient ) { }
22
19
23
20
// TODO: convert to Map (maybe via ES6)
24
21
getClassificationCategoriesByType ( ) : Observable < CategoriesResponse > {
25
- return this . httpClient . get < CategoriesResponse > ( this . urlCategoriesByType ) ;
22
+ return this . httpClient . get < CategoriesResponse > ( ` ${ environment . taskanaRestUrl } /v1/classifications-by-type` ) ;
26
23
}
27
24
28
25
getCustomisation ( ) : Observable < Customisation > {
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ export class ClassificationState {
34
34
) ;
35
35
}
36
36
37
- ngxsOnInit ( ctx : StateContext < ClassificationStateModel > ) : void {
37
+ // initialize after Startup service has configured the taskanaRestUrl properly.
38
+ ngxsAfterBootstrap ( ctx : StateContext < ClassificationStateModel > ) : void {
38
39
ctx . dispatch ( new InitializeStore ( ) ) ;
39
40
}
40
41
}
You can’t perform that action at this time.
0 commit comments