aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/login/login.component.ts
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-03-26 15:38:46 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-03-26 15:38:46 -0400
commitea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae (patch)
tree4450553037eaec406d8e0bb2c3a4200b188f01ea /ufund-ui/src/app/components/login/login.component.ts
parent5f03e80712f7a18370b5118fde5327bde1b6fbbf (diff)
downloadJellySolutions-ea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae.tar.gz
JellySolutions-ea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae.tar.bz2
JellySolutions-ea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae.zip
Make frontend work with the new backend checkout system
Diffstat (limited to 'ufund-ui/src/app/components/login/login.component.ts')
-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])