diff options
author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-31 20:28:35 -0400 |
---|---|---|
committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-31 20:28:35 -0400 |
commit | e1ef22279baccb4b2a5a1ecbb5222e4008d4d523 (patch) | |
tree | b00669f1787c59374c536baa87b9eafcda5da85d /ufund-ui/src/app/components/signup/signup.component.ts | |
parent | b7539414ac6aa8efd423a3a9a0a2b5586757e19c (diff) | |
download | JellySolutions-e1ef22279baccb4b2a5a1ecbb5222e4008d4d523.tar.gz JellySolutions-e1ef22279baccb4b2a5a1ecbb5222e4008d4d523.tar.bz2 JellySolutions-e1ef22279baccb4b2a5a1ecbb5222e4008d4d523.zip |
Added toasts for error handling
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) }) } |