diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-08-23 16:54:21 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-08-23 16:54:21 +0200 |
commit | de59c48f5f317018e3f746bbe4a7b7efe00109f2 (patch) | |
tree | bc3d007c5aaed8dc72119763f3b1731c5777f218 /client/src/app/login | |
parent | def16d33d19153c6583fa8a30634760b3d64d34c (diff) | |
download | PeerTube-de59c48f5f317018e3f746bbe4a7b7efe00109f2.tar.gz PeerTube-de59c48f5f317018e3f746bbe4a7b7efe00109f2.tar.zst PeerTube-de59c48f5f317018e3f746bbe4a7b7efe00109f2.zip |
Client: centralize http res extraction in a service
Diffstat (limited to 'client/src/app/login')
-rw-r--r-- | client/src/app/login/login.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index fe867b7b4..1e0ba0fe8 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts | |||
@@ -37,12 +37,12 @@ export class LoginComponent implements OnInit { | |||
37 | this.router.navigate(['/videos/list']); | 37 | this.router.navigate(['/videos/list']); |
38 | }, | 38 | }, |
39 | error => { | 39 | error => { |
40 | console.error(error); | 40 | console.error(error.json); |
41 | 41 | ||
42 | if (error.error === 'invalid_grant') { | 42 | if (error.json.error === 'invalid_grant') { |
43 | this.error = 'Credentials are invalid.'; | 43 | this.error = 'Credentials are invalid.'; |
44 | } else { | 44 | } else { |
45 | this.error = `${error.error}: ${error.error_description}`; | 45 | this.error = `${error.json.error}: ${error.json.error_description}`; |
46 | } | 46 | } |
47 | } | 47 | } |
48 | ); | 48 | ); |