connexion avec le back

This commit is contained in:
MiharyR 2022-01-14 20:15:50 +01:00
parent 91e4bba793
commit 4620f0dff9
16 changed files with 178 additions and 110 deletions

View file

@ -46,14 +46,14 @@ export class PageLoginComponent
if(retour.status !== "success")
{
console.log(retour);
this.errorMessage = retour.message;
this.errorMessage = retour.error.message;
this.hasError = true;
}
else {
this.profilService.setId(retour.data.id);
this.profilService.setIsAdmin(retour.data.is_admin)
if(retour.data.is_admin) this.router.navigateByUrl('admin/userList');
else this.router.navigateByUrl('user/userList');
else this.router.navigateByUrl('user/registry');
}
}