diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-09 19:12:40 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-09 19:12:40 +0200 |
commit | db7af09bd8e9de57cdda88c2e32387551235b3a4 (patch) | |
tree | 8e3cac831be63a2c66e3b6d5e3b22e33492fb726 /client/src/app/core/config/config.service.ts | |
parent | bcd1c9e19447a98d605385fab69b5cfa58d0ba4b (diff) | |
download | PeerTube-db7af09bd8e9de57cdda88c2e32387551235b3a4.tar.gz PeerTube-db7af09bd8e9de57cdda88c2e32387551235b3a4.tar.zst PeerTube-db7af09bd8e9de57cdda88c2e32387551235b3a4.zip |
Client: fix loading server configurations
Diffstat (limited to 'client/src/app/core/config/config.service.ts')
-rw-r--r-- | client/src/app/core/config/config.service.ts | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/client/src/app/core/config/config.service.ts b/client/src/app/core/config/config.service.ts deleted file mode 100644 index 3c479bcb8..000000000 --- a/client/src/app/core/config/config.service.ts +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | import { Injectable } from '@angular/core' | ||
2 | import { HttpClient } from '@angular/common/http' | ||
3 | |||
4 | import { ServerConfig } from '../../../../../shared' | ||
5 | |||
6 | @Injectable() | ||
7 | export class ConfigService { | ||
8 | private static BASE_CONFIG_URL = API_URL + '/api/v1/config/' | ||
9 | |||
10 | private config: ServerConfig = { | ||
11 | signup: { | ||
12 | allowed: false | ||
13 | } | ||
14 | } | ||
15 | |||
16 | constructor (private http: HttpClient) {} | ||
17 | |||
18 | loadConfig () { | ||
19 | this.http.get<ServerConfig>(ConfigService.BASE_CONFIG_URL) | ||
20 | .subscribe(data => this.config = data) | ||
21 | } | ||
22 | |||
23 | getConfig () { | ||
24 | return this.config | ||
25 | } | ||
26 | } | ||