Autenticação com Basic Auth na classe authservice no método login().

This commit is contained in:
z0rb3
2020-08-11 12:07:13 +01:00
parent 03396567df
commit c0a8c2b19d
+9 -5
View File
@@ -81,18 +81,22 @@ export class LoginPage implements OnInit {
}*/ }*/
} }
simpleLogin(){ async simpleLogin(){
//Go to our home in home/feed. //Go to our home in home/feed.
if(this.validateInput()){ if(this.validateInput()){
if (await this.authService.login(this.postData))
{
this.router.navigate(['/home/feed']); this.router.navigate(['/home/feed']);
console.log(this.postData); console.log(this.postData);
} }
else
{
console.log("Não foi possível fazer login");
}
}
else{ else{
console.log("Preencha todos campos"); console.log("Preencha todos campos");
} }
} }
} }