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