`${environment.base_href}/assets/json/gateways.json`

merge-requests/1/head
Nato Boram 2019-12-03 00:25:46 -05:00
parent adc24a72ba
commit 093c3fffbf
No known key found for this signature in database
GPG Key ID: C035B4A0E33CF552
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root'
@ -12,7 +13,11 @@ export class GatewayService {
) { }
list(): Observable<string[]> {
return this.http.get<string[]>('/assets/json/gateways.json');
return this.http.get<string[]>(
environment.base_href && environment.base_href !== '/'
? `${environment.base_href}/assets/json/gateways.json`
: '/assets/json/gateways.json'
);
}
get(gateway: string, type: string, hash: string): Observable<Blob> {