diff options
Diffstat (limited to 'ufund-ui/src/app/components/signup/signup.component.ts')
-rw-r--r-- | ufund-ui/src/app/components/signup/signup.component.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/signup/signup.component.ts b/ufund-ui/src/app/components/signup/signup.component.ts index 1ab863d..5ec84ae 100644 --- a/ufund-ui/src/app/components/signup/signup.component.ts +++ b/ufund-ui/src/app/components/signup/signup.component.ts @@ -2,6 +2,7 @@ import {Component} from '@angular/core'; import {UsersService} from '../../services/users.service'; import {Router} from '@angular/router'; import {BehaviorSubject} from 'rxjs'; +import {ToastsService, ToastType} from '../../services/toasts.service'; class PasswordRequirements { sixLong: {title: string, value: boolean} = {title: 'Is 6 characters or longer' , value: false} @@ -34,6 +35,7 @@ export class SignupComponent { constructor( protected usersService: UsersService, protected router: Router, + protected toastService: ToastsService ) {} signup(username: string | null, password: string | null) { @@ -45,7 +47,7 @@ export class SignupComponent { this.usersService.createUser(username, password).then(() => { this.showSuccessMessage.next(true); }).catch(ex => { - this.statusText.next("Unable to create account: " + friendlyHttpStatus[ex.status]) + this.toastService.sendToast(ToastType.INFO, "Unable to create account: " + friendlyHttpStatus[ex.status]) console.log(ex) }) } |