diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-04 10:34:40 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-12-04 10:34:40 +0100 |
commit | 2295ce6c4e7ba805cc100ff961527bebc2cd89e5 (patch) | |
tree | fce0a24074ac119aad730ef5c73c680500ff9578 /client/src/app/core | |
parent | 202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7 (diff) | |
download | PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.tar.gz PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.tar.zst PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.zip |
Add account avatar
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/auth/auth.service.ts | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 9e6c6b888..fd2708c11 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts | |||
@@ -1,30 +1,25 @@ | |||
1 | import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http' | ||
1 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
2 | import { Router } from '@angular/router' | 3 | import { Router } from '@angular/router' |
3 | import { Observable } from 'rxjs/Observable' | 4 | |
4 | import { Subject } from 'rxjs/Subject' | 5 | import { NotificationsService } from 'angular2-notifications' |
5 | import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http' | 6 | import 'rxjs/add/observable/throw' |
6 | import { ReplaySubject } from 'rxjs/ReplaySubject' | ||
7 | import 'rxjs/add/operator/do' | 7 | import 'rxjs/add/operator/do' |
8 | import 'rxjs/add/operator/map' | 8 | import 'rxjs/add/operator/map' |
9 | import 'rxjs/add/operator/mergeMap' | 9 | import 'rxjs/add/operator/mergeMap' |
10 | import 'rxjs/add/observable/throw' | 10 | import { Observable } from 'rxjs/Observable' |
11 | 11 | import { ReplaySubject } from 'rxjs/ReplaySubject' | |
12 | import { NotificationsService } from 'angular2-notifications' | 12 | import { Subject } from 'rxjs/Subject' |
13 | 13 | import { OAuthClientLocal, User as UserServerModel, UserRefreshToken, UserRole, VideoChannel } from '../../../../../shared' | |
14 | import { AuthStatus } from './auth-status.model' | 14 | import { Account } from '../../../../../shared/models/accounts' |
15 | import { AuthUser } from './auth-user.model' | 15 | import { UserLogin } from '../../../../../shared/models/users/user-login.model' |
16 | import { | ||
17 | OAuthClientLocal, | ||
18 | UserRole, | ||
19 | UserRefreshToken, | ||
20 | VideoChannel, | ||
21 | User as UserServerModel | ||
22 | } from '../../../../../shared' | ||
23 | // Do not use the barrel (dependency loop) | 16 | // Do not use the barrel (dependency loop) |
24 | import { RestExtractor } from '../../shared/rest' | 17 | import { RestExtractor } from '../../shared/rest' |
25 | import { UserLogin } from '../../../../../shared/models/users/user-login.model' | ||
26 | import { UserConstructorHash } from '../../shared/users/user.model' | 18 | import { UserConstructorHash } from '../../shared/users/user.model' |
27 | 19 | ||
20 | import { AuthStatus } from './auth-status.model' | ||
21 | import { AuthUser } from './auth-user.model' | ||
22 | |||
28 | interface UserLoginWithUsername extends UserLogin { | 23 | interface UserLoginWithUsername extends UserLogin { |
29 | access_token: string | 24 | access_token: string |
30 | refresh_token: string | 25 | refresh_token: string |
@@ -42,10 +37,7 @@ interface UserLoginWithUserInformation extends UserLogin { | |||
42 | displayNSFW: boolean | 37 | displayNSFW: boolean |
43 | email: string | 38 | email: string |
44 | videoQuota: number | 39 | videoQuota: number |
45 | account: { | 40 | account: Account |
46 | id: number | ||
47 | uuid: string | ||
48 | } | ||
49 | videoChannels: VideoChannel[] | 41 | videoChannels: VideoChannel[] |
50 | } | 42 | } |
51 | 43 | ||