aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/account/account.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-04 11:45:47 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-03-04 11:45:47 +0100
commite2a2d6c86c7ca39074fdff3b545947d1d58dc008 (patch)
treea3420493460f67472acceae2a5746612a30943f0 /client/src/app/account/account.component.ts
parenta7449e74f9105839fa03f0b2e23b435f37a1fc2f (diff)
downloadPeerTube-e2a2d6c86c7ca39074fdff3b545947d1d58dc008.tar.gz
PeerTube-e2a2d6c86c7ca39074fdff3b545947d1d58dc008.tar.zst
PeerTube-e2a2d6c86c7ca39074fdff3b545947d1d58dc008.zip
Client: check token valitidy at startup
Diffstat (limited to 'client/src/app/account/account.component.ts')
-rw-r--r--client/src/app/account/account.component.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/src/app/account/account.component.ts b/client/src/app/account/account.component.ts
index 9b6b5fbf4..14452a73e 100644
--- a/client/src/app/account/account.component.ts
+++ b/client/src/app/account/account.component.ts
@@ -4,8 +4,7 @@ import { Router } from '@angular/router';
4 4
5import { NotificationsService } from 'angular2-notifications'; 5import { NotificationsService } from 'angular2-notifications';
6 6
7import { AccountService } from './account.service'; 7import { FormReactive, UserService, USER_PASSWORD } from '../shared';
8import { FormReactive, USER_PASSWORD } from '../shared';
9 8
10@Component({ 9@Component({
11 selector: 'my-account', 10 selector: 'my-account',
@@ -29,7 +28,7 @@ export class AccountComponent extends FormReactive implements OnInit {
29 private formBuilder: FormBuilder, 28 private formBuilder: FormBuilder,
30 private router: Router, 29 private router: Router,
31 private notificationsService: NotificationsService, 30 private notificationsService: NotificationsService,
32 private accountService: AccountService 31 private userService: UserService
33 ) { 32 ) {
34 super(); 33 super();
35 } 34 }
@@ -58,7 +57,7 @@ export class AccountComponent extends FormReactive implements OnInit {
58 return; 57 return;
59 } 58 }
60 59
61 this.accountService.changePassword(newPassword).subscribe( 60 this.userService.changePassword(newPassword).subscribe(
62 () => this.notificationsService.success('Success', 'Password updated.'), 61 () => this.notificationsService.success('Success', 'Password updated.'),
63 62
64 err => this.error = err 63 err => this.error = err