aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/login/login.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/login/login.component.ts')
-rw-r--r--client/src/app/login/login.component.ts11
1 files changed, 1 insertions, 10 deletions
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts
index 212a8ff1f..18f8f69e5 100644
--- a/client/src/app/login/login.component.ts
+++ b/client/src/app/login/login.component.ts
@@ -64,7 +64,7 @@ export class LoginComponent extends FormReactive implements OnInit {
64 64
65 this.authService.login(username, password) 65 this.authService.login(username, password)
66 .subscribe( 66 .subscribe(
67 () => this.redirect(), 67 () => this.redirectService.redirectToPreviousRoute(),
68 68
69 err => { 69 err => {
70 if (err.message.indexOf('credentials are invalid') !== -1) this.error = this.i18n('Incorrect username or password.') 70 if (err.message.indexOf('credentials are invalid') !== -1) this.error = this.i18n('Incorrect username or password.')
@@ -74,15 +74,6 @@ export class LoginComponent extends FormReactive implements OnInit {
74 ) 74 )
75 } 75 }
76 76
77 redirect () {
78 const redirect = this.authService.redirectUrl
79 if (redirect) {
80 this.router.navigate([ redirect ])
81 } else {
82 this.redirectService.redirectToHomepage()
83 }
84 }
85
86 askResetPassword () { 77 askResetPassword () {
87 this.userService.askResetPassword(this.forgotPasswordEmail) 78 this.userService.askResetPassword(this.forgotPasswordEmail)
88 .subscribe( 79 .subscribe(