aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/login/login.component.ts
diff options
context:
space:
mode:
authorTyler Ferrari <69283684+Sowgro@users.noreply.github.com>2025-03-27 18:50:33 -0400
committerGitHub <noreply@github.com>2025-03-27 18:50:33 -0400
commitddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae (patch)
tree0a0f9669fb0f7cf2f2816b798269e50a8b26f125 /ufund-ui/src/app/components/login/login.component.ts
parent35d7c971ed47718d4dc5738edb09d62cd780dac4 (diff)
parent4f5e9e9ecda282a98af5d70bd6cf0540973c7314 (diff)
downloadJellySolutions-ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae.tar.gz
JellySolutions-ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae.tar.bz2
JellySolutions-ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae.zip
Merge pull request #17 from RIT-SWEN-261-02/api-cleanup
Merge api-cleanup into main
Diffstat (limited to '')
-rw-r--r--ufund-ui/src/app/components/login/login.component.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/ufund-ui/src/app/components/login/login.component.ts b/ufund-ui/src/app/components/login/login.component.ts
index 9d806f5..f6a2996 100644
--- a/ufund-ui/src/app/components/login/login.component.ts
+++ b/ufund-ui/src/app/components/login/login.component.ts
@@ -2,12 +2,13 @@ import {Component, OnInit} from '@angular/core'
import {UsersService} from '../../services/users.service';
import {ActivatedRoute, Router} from '@angular/router';
import {BehaviorSubject} from 'rxjs';
+import {AuthService} from '../../services/auth.service';
@Component({
- selector: 'app-login',
- standalone: false,
- templateUrl: './login.component.html',
- styleUrl: './login.component.css'
+ selector: 'app-login',
+ standalone: false,
+ templateUrl: './login.component.html',
+ styleUrl: './login.component.css'
})
export class LoginComponent implements OnInit {
@@ -17,7 +18,8 @@ export class LoginComponent implements OnInit {
constructor(
protected usersService: UsersService,
protected router: Router,
- private route: ActivatedRoute
+ private route: ActivatedRoute,
+ private authService: AuthService
) {}
ngOnInit() {
@@ -31,7 +33,7 @@ export class LoginComponent implements OnInit {
return;
}
- this.usersService.login(username, password).then(() => {
+ this.authService.login(username, password).then(() => {
this.router.navigate([next]);
}).catch(ex => {
this.statusText.next("Unable to login: " + friendlyHttpStatus[ex.status])