From 2054c951ae8b9658e9c8b493f33830c25ce22c6d Mon Sep 17 00:00:00 2001 From: softsimon Date: Mon, 23 Nov 2020 15:04:41 +0700 Subject: [PATCH] Remove ssr prepended url from asset service. --- frontend/src/app/services/assets.service.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/app/services/assets.service.ts b/frontend/src/app/services/assets.service.ts index 6bed04f94..2adf57211 100644 --- a/frontend/src/app/services/assets.service.ts +++ b/frontend/src/app/services/assets.service.ts @@ -2,7 +2,6 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { shareReplay } from 'rxjs/operators'; -import { StateService } from './state.service'; @Injectable({ providedIn: 'root' @@ -14,15 +13,9 @@ export class AssetsService { constructor( private httpClient: HttpClient, - private stateService: StateService, ) { - let baseApiUrl = ''; - if (!this.stateService.isBrowser) { - baseApiUrl = this.stateService.env.BACKEND_ABSOLUTE_URL; - } - - this.getAssetsJson$ = this.httpClient.get(baseApiUrl + '/resources/assets.json').pipe(shareReplay()); - this.getAssetsMinimalJson$ = this.httpClient.get(baseApiUrl + '/resources/assets.minimal.json').pipe(shareReplay()); - this.getMiningPools$ = this.httpClient.get(baseApiUrl + '/resources/pools.json').pipe(shareReplay()); + this.getAssetsJson$ = this.httpClient.get('/resources/assets.json').pipe(shareReplay()); + this.getAssetsMinimalJson$ = this.httpClient.get('/resources/assets.minimal.json').pipe(shareReplay()); + this.getMiningPools$ = this.httpClient.get('/resources/pools.json').pipe(shareReplay()); } }