connexion avec le back
This commit is contained in:
parent
91e4bba793
commit
4620f0dff9
16 changed files with 178 additions and 110 deletions
|
|
@ -8,8 +8,8 @@ export class ProfilService
|
|||
|
||||
constructor()
|
||||
{
|
||||
this.setId(-1);
|
||||
this.setIsAdmin(false);
|
||||
if(localStorage.getItem('id') === null) this.setId(-1);
|
||||
if(localStorage.getItem('isAdmin') === null) this.setIsAdmin(false);
|
||||
}
|
||||
|
||||
getId(): number
|
||||
|
|
@ -24,7 +24,7 @@ export class ProfilService
|
|||
localStorage.setItem('id', id.toString());
|
||||
}
|
||||
|
||||
getIsAdmin(): boolean
|
||||
isAdmin(): boolean
|
||||
{
|
||||
let isAdminString = localStorage.getItem('isAdmin');
|
||||
if(isAdminString === "T") return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue