import { Notifier, UserService } from '@app/core'
import { RESET_PASSWORD_CONFIRM_VALIDATOR } from '@app/shared/form-validators/reset-password-validators'
import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
+import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
@Component({
selector: 'my-login',
private verificationString: string
constructor (
- protected formValidatorService: FormValidatorService,
+ protected formReactiveService: FormReactiveService,
private userService: UserService,
private notifier: Notifier,
private router: Router,
private route: ActivatedRoute
- ) {
+ ) {
super()
}
resetPassword () {
this.userService.resetPassword(this.userId, this.verificationString, this.form.value.password)
- .subscribe(
- () => {
+ .subscribe({
+ next: () => {
this.notifier.success($localize`Your password has been successfully reset!`)
this.router.navigate([ '/login' ])
},
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
isConfirmedPasswordValid () {