diff options
Diffstat (limited to 'client/src/app/core/config/config.service.ts')
-rw-r--r-- | client/src/app/core/config/config.service.ts | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/client/src/app/core/config/config.service.ts b/client/src/app/core/config/config.service.ts index acdc12cc6..3c479bcb8 100644 --- a/client/src/app/core/config/config.service.ts +++ b/client/src/app/core/config/config.service.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { Http } from '@angular/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | 3 | ||
4 | import { RestExtractor } from '../../shared/rest' | ||
5 | import { ServerConfig } from '../../../../../shared' | 4 | import { ServerConfig } from '../../../../../shared' |
6 | 5 | ||
7 | @Injectable() | 6 | @Injectable() |
@@ -14,17 +13,11 @@ export class ConfigService { | |||
14 | } | 13 | } |
15 | } | 14 | } |
16 | 15 | ||
17 | constructor ( | 16 | constructor (private http: HttpClient) {} |
18 | private http: Http, | ||
19 | private restExtractor: RestExtractor | ||
20 | ) {} | ||
21 | 17 | ||
22 | loadConfig () { | 18 | loadConfig () { |
23 | this.http.get(ConfigService.BASE_CONFIG_URL) | 19 | this.http.get<ServerConfig>(ConfigService.BASE_CONFIG_URL) |
24 | .map(this.restExtractor.extractDataGet) | 20 | .subscribe(data => this.config = data) |
25 | .subscribe(data => { | ||
26 | this.config = data | ||
27 | }) | ||
28 | } | 21 | } |
29 | 22 | ||
30 | getConfig () { | 23 | getConfig () { |