simplyfy currentUser checkup
parent
1c88cc80af
commit
6c7088bc01
|
@ -35,7 +35,6 @@ export class LoginService {
|
|||
signUp(username: string, password: string, secret: string) {
|
||||
return this.http.post(this.config.apiSignupPath, {username: username, password: password, secret: secret})
|
||||
.map((response: Response) => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -45,10 +44,7 @@ export class LoginService {
|
|||
}
|
||||
|
||||
isLoggedIn() {
|
||||
if (localStorage.getItem('currentUser')) {
|
||||
return true;
|
||||
}
|
||||
return false
|
||||
return !!localStorage.getItem('currentUser');
|
||||
}
|
||||
|
||||
hasPermission(level: number) {
|
||||
|
|
Loading…
Reference in New Issue