diff options
Diffstat (limited to 'client/app/users/login/login.component.ts')
-rw-r--r-- | client/app/users/login/login.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/app/users/login/login.component.ts b/client/app/users/login/login.component.ts index 33590ad4c..8e369541d 100644 --- a/client/app/users/login/login.component.ts +++ b/client/app/users/login/login.component.ts | |||
@@ -10,17 +10,17 @@ import { AuthService, AuthStatus, User } from '../shared/index'; | |||
10 | }) | 10 | }) |
11 | 11 | ||
12 | export class UserLoginComponent { | 12 | export class UserLoginComponent { |
13 | constructor(private _authService: AuthService, private _router: Router) {} | 13 | constructor(private authService: AuthService, private router: Router) {} |
14 | 14 | ||
15 | login(username: string, password: string) { | 15 | login(username: string, password: string) { |
16 | this._authService.login(username, password).subscribe( | 16 | this.authService.login(username, password).subscribe( |
17 | result => { | 17 | result => { |
18 | const user = new User(username, result); | 18 | const user = new User(username, result); |
19 | user.save(); | 19 | user.save(); |
20 | 20 | ||
21 | this._authService.setStatus(AuthStatus.LoggedIn); | 21 | this.authService.setStatus(AuthStatus.LoggedIn); |
22 | 22 | ||
23 | this._router.navigate(['VideosList']); | 23 | this.router.navigate(['VideosList']); |
24 | }, | 24 | }, |
25 | error => { | 25 | error => { |
26 | if (error.error === 'invalid_grant') { | 26 | if (error.error === 'invalid_grant') { |