diff --git a/web/src/app/shared/services/classifications/classification-categories.service.ts b/web/src/app/shared/services/classifications/classification-categories.service.ts index 6075385e6f..118cab0f1a 100644 --- a/web/src/app/shared/services/classifications/classification-categories.service.ts +++ b/web/src/app/shared/services/classifications/classification-categories.service.ts @@ -15,14 +15,11 @@ export interface CategoriesResponse { [key: string]: string[] } @Injectable() export class ClassificationCategoriesService { - private mainUrl = environment.taskanaRestUrl; - private urlCategoriesByType = `${this.mainUrl}/v1/classifications-by-type`; - constructor(private httpClient: HttpClient) {} // TODO: convert to Map (maybe via ES6) getClassificationCategoriesByType(): Observable { - return this.httpClient.get(this.urlCategoriesByType); + return this.httpClient.get(`${environment.taskanaRestUrl}/v1/classifications-by-type`); } getCustomisation(): Observable { diff --git a/web/src/app/store/classification-store/classification.state.ts b/web/src/app/store/classification-store/classification.state.ts index 9b0a777e36..400a66f88f 100644 --- a/web/src/app/store/classification-store/classification.state.ts +++ b/web/src/app/store/classification-store/classification.state.ts @@ -34,7 +34,8 @@ export class ClassificationState { ); } - ngxsOnInit(ctx: StateContext): void { + // initialize after Startup service has configured the taskanaRestUrl properly. + ngxsAfterBootstrap(ctx: StateContext): void { ctx.dispatch(new InitializeStore()); } }