projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eacf925
)
Use server error message on login
author
Chocobozzz
<me@florianbigard.com>
Fri, 29 Dec 2017 08:22:23 +0000
(09:22 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Fri, 29 Dec 2017 08:22:23 +0000
(09:22 +0100)
client/src/app/login/login.component.ts
patch
|
blob
|
history
diff --git
a/client/src/app/login/login.component.ts
b/client/src/app/login/login.component.ts
index dfede592478046d01872248491f53d74cd28de5f..e7c9c722632a3dfdb6504a7705ea5fe3c65a7513 100644
(file)
--- a/
client/src/app/login/login.component.ts
+++ b/
client/src/app/login/login.component.ts
@@
-55,15
+55,9
@@
export class LoginComponent extends FormReactive implements OnInit {
const { username, password } = this.form.value
this.authService.login(username, password).subscribe(
-
result
=> this.router.navigate(['/videos/list']),
+
()
=> this.router.navigate(['/videos/list']),
- err => {
- if (err.message === 'invalid_grant') {
- this.error = 'Credentials are invalid.'
- } else {
- this.error = `${err.body.error_description}`
- }
- }
+ err => this.error = err.message
)
}
}