diff options
Diffstat (limited to 'client/src/app/core/config')
-rw-r--r-- | client/src/app/core/config/config.service.ts | 24 | ||||
-rw-r--r-- | client/src/app/core/config/index.ts | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/client/src/app/core/config/config.service.ts b/client/src/app/core/config/config.service.ts index 407dca083..a83ec61d2 100644 --- a/client/src/app/core/config/config.service.ts +++ b/client/src/app/core/config/config.service.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Injectable } from '@angular/core'; | 1 | import { Injectable } from '@angular/core' |
2 | import { Http } from '@angular/http'; | 2 | import { Http } from '@angular/http' |
3 | 3 | ||
4 | import { RestExtractor } from '../../shared/rest'; | 4 | import { RestExtractor } from '../../shared/rest' |
5 | 5 | ||
6 | @Injectable() | 6 | @Injectable() |
7 | export class ConfigService { | 7 | export class ConfigService { |
8 | private static BASE_CONFIG_URL = API_URL + '/api/v1/config/'; | 8 | private static BASE_CONFIG_URL = API_URL + '/api/v1/config/' |
9 | 9 | ||
10 | private config: { | 10 | private config: { |
11 | signup: { | 11 | signup: { |
@@ -15,22 +15,22 @@ export class ConfigService { | |||
15 | signup: { | 15 | signup: { |
16 | enabled: false | 16 | enabled: false |
17 | } | 17 | } |
18 | }; | 18 | } |
19 | 19 | ||
20 | constructor( | 20 | constructor ( |
21 | private http: Http, | 21 | private http: Http, |
22 | private restExtractor: RestExtractor, | 22 | private restExtractor: RestExtractor |
23 | ) {} | 23 | ) {} |
24 | 24 | ||
25 | loadConfig() { | 25 | loadConfig () { |
26 | this.http.get(ConfigService.BASE_CONFIG_URL) | 26 | this.http.get(ConfigService.BASE_CONFIG_URL) |
27 | .map(this.restExtractor.extractDataGet) | 27 | .map(this.restExtractor.extractDataGet) |
28 | .subscribe(data => { | 28 | .subscribe(data => { |
29 | this.config = data; | 29 | this.config = data |
30 | }); | 30 | }) |
31 | } | 31 | } |
32 | 32 | ||
33 | getConfig() { | 33 | getConfig () { |
34 | return this.config; | 34 | return this.config |
35 | } | 35 | } |
36 | } | 36 | } |
diff --git a/client/src/app/core/config/index.ts b/client/src/app/core/config/index.ts index 90392254a..3724e12f2 100644 --- a/client/src/app/core/config/index.ts +++ b/client/src/app/core/config/index.ts | |||
@@ -1 +1 @@ | |||
export * from './config.service'; | export * from './config.service' | ||