Skip to content

Commit 7735ca8

Browse files
committed
cambios registro (sigue sin funcionar)
1 parent e6a0f8c commit 7735ca8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

frontend/src/app/components/login/login.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class LoginComponent {
1515
event.preventDefault();
1616

1717
this.loginService.logIn(user, pass);
18-
this.router.navigate(['/userProfile']);
18+
this.router.navigate(['/home']);
1919
}
2020

2121
logOut() {

frontend/src/app/components/login/signUp.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class SignUpComponent {
1414

1515
event.preventDefault();
1616
var user: Usero = { nick, name, lastName, email, creditCard: "",image: false, roles: ['USERO']}
17-
this.useroService.createUser(user);
17+
this.useroService.createUser(user, pass);
1818

1919
if(user.id){
2020
alert("Usuario creado exitoso");

frontend/src/app/services/usero.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export class UseroService {
5555
}
5656

5757
/*------------------CREATE METHODS------------------*/
58-
createUser(user: Usero) {
58+
createUser(user: Usero, pass : String) {
5959
if (!user.id) {
60-
return this.http.post(BASE_URL, user, {withCredentials: true}).subscribe(
60+
return this.http.post(BASE_URL, {user, pass}, {withCredentials: true}).subscribe(
6161
(response) => this.router.navigate(['login']),
6262
(error) => alert('Usuario ya existe, inicie sesión')
6363
)

0 commit comments

Comments
 (0)