aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/config/config.service.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-14 11:57:49 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-14 11:57:49 +0200
commitd592e0a9b2931c7c9cbedb27fb8efc9aaacad9bb (patch)
tree549b14b842de296efed846a11b3681efe08cfa9e /client/src/app/core/config/config.service.ts
parent91f6f169b1110eeae6ebf5c387f4204b0d07703c (diff)
downloadPeerTube-d592e0a9b2931c7c9cbedb27fb8efc9aaacad9bb.tar.gz
PeerTube-d592e0a9b2931c7c9cbedb27fb8efc9aaacad9bb.tar.zst
PeerTube-d592e0a9b2931c7c9cbedb27fb8efc9aaacad9bb.zip
Move to HttpClient and PrimeNG data table
Diffstat (limited to 'client/src/app/core/config/config.service.ts')
-rw-r--r--client/src/app/core/config/config.service.ts15
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 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { Http } from '@angular/http' 2import { HttpClient } from '@angular/common/http'
3 3
4import { RestExtractor } from '../../shared/rest'
5import { ServerConfig } from '../../../../../shared' 4import { 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 () {