aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/config/config.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/config/config.service.ts')
-rw-r--r--client/src/app/core/config/config.service.ts24
1 files changed, 12 insertions, 12 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 @@
1import { Injectable } from '@angular/core'; 1import { Injectable } from '@angular/core'
2import { Http } from '@angular/http'; 2import { Http } from '@angular/http'
3 3
4import { RestExtractor } from '../../shared/rest'; 4import { RestExtractor } from '../../shared/rest'
5 5
6@Injectable() 6@Injectable()
7export class ConfigService { 7export 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}