aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/auth/auth.service.ts10
-rw-r--r--client/src/app/core/core.module.ts1
-rw-r--r--client/src/app/core/server/server.service.ts6
3 files changed, 7 insertions, 10 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index e887dde1f..e2b8b6ba5 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -1,7 +1,6 @@
1import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http' 1import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import { Router } from '@angular/router' 3import { Router } from '@angular/router'
4
5import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
6import 'rxjs/add/observable/throw' 5import 'rxjs/add/observable/throw'
7import 'rxjs/add/operator/do' 6import 'rxjs/add/operator/do'
@@ -13,10 +12,9 @@ import { Subject } from 'rxjs/Subject'
13import { OAuthClientLocal, User as UserServerModel, UserRefreshToken, UserRole, VideoChannel } from '../../../../../shared' 12import { OAuthClientLocal, User as UserServerModel, UserRefreshToken, UserRole, VideoChannel } from '../../../../../shared'
14import { Account } from '../../../../../shared/models/accounts' 13import { Account } from '../../../../../shared/models/accounts'
15import { UserLogin } from '../../../../../shared/models/users/user-login.model' 14import { UserLogin } from '../../../../../shared/models/users/user-login.model'
16// Do not use the barrel (dependency loop) 15import { environment } from '../../../environments/environment'
17import { RestExtractor } from '../../shared/rest' 16import { RestExtractor } from '../../shared/rest'
18import { UserConstructorHash } from '../../shared/users/user.model' 17import { UserConstructorHash } from '../../shared/users/user.model'
19
20import { AuthStatus } from './auth-status.model' 18import { AuthStatus } from './auth-status.model'
21import { AuthUser } from './auth-user.model' 19import { AuthUser } from './auth-user.model'
22 20
@@ -43,9 +41,9 @@ interface UserLoginWithUserInformation extends UserLogin {
43 41
44@Injectable() 42@Injectable()
45export class AuthService { 43export class AuthService {
46 private static BASE_CLIENT_URL = API_URL + '/api/v1/oauth-clients/local' 44 private static BASE_CLIENT_URL = environment.apiUrl + '/api/v1/oauth-clients/local'
47 private static BASE_TOKEN_URL = API_URL + '/api/v1/users/token' 45 private static BASE_TOKEN_URL = environment.apiUrl + '/api/v1/users/token'
48 private static BASE_USER_INFORMATION_URL = API_URL + '/api/v1/users/me' 46 private static BASE_USER_INFORMATION_URL = environment.apiUrl + '/api/v1/users/me'
49 47
50 loginChangedSource: Observable<AuthStatus> 48 loginChangedSource: Observable<AuthStatus>
51 userInformationLoaded = new ReplaySubject<boolean>(1) 49 userInformationLoaded = new ReplaySubject<boolean>(1)
diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts
index 75262e6cf..a58fe6ebe 100644
--- a/client/src/app/core/core.module.ts
+++ b/client/src/app/core/core.module.ts
@@ -11,7 +11,6 @@ import { AuthService } from './auth'
11import { LoginGuard, UserRightGuard } from './routing' 11import { LoginGuard, UserRightGuard } from './routing'
12import { ServerService } from './server' 12import { ServerService } from './server'
13import { ConfirmComponent, ConfirmService } from './confirm' 13import { ConfirmComponent, ConfirmService } from './confirm'
14import { MenuComponent, MenuAdminComponent } from './menu'
15import { throwIfAlreadyLoaded } from './module-import-guard' 14import { throwIfAlreadyLoaded } from './module-import-guard'
16 15
17@NgModule({ 16@NgModule({
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index 16e0595b6..a5be9e199 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -2,13 +2,13 @@ import { HttpClient } from '@angular/common/http'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import 'rxjs/add/operator/do' 3import 'rxjs/add/operator/do'
4import { ReplaySubject } from 'rxjs/ReplaySubject' 4import { ReplaySubject } from 'rxjs/ReplaySubject'
5
6import { ServerConfig } from '../../../../../shared' 5import { ServerConfig } from '../../../../../shared'
6import { environment } from '../../../environments/environment'
7 7
8@Injectable() 8@Injectable()
9export class ServerService { 9export class ServerService {
10 private static BASE_CONFIG_URL = API_URL + '/api/v1/config/' 10 private static BASE_CONFIG_URL = environment.apiUrl + '/api/v1/config/'
11 private static BASE_VIDEO_URL = API_URL + '/api/v1/videos/' 11 private static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
12 12
13 videoPrivaciesLoaded = new ReplaySubject<boolean>(1) 13 videoPrivaciesLoaded = new ReplaySubject<boolean>(1)
14 videoCategoriesLoaded = new ReplaySubject<boolean>(1) 14 videoCategoriesLoaded = new ReplaySubject<boolean>(1)