Update about the showing the user images

This commit is contained in:
Sébastien André
2021-03-26 15:05:06 +01:00
parent 9d51f38f2e
commit fe255041cc
12 changed files with 70 additions and 71 deletions

View File

@@ -20,8 +20,6 @@ export class AuthenticationService extends BaseService {
JSON.parse(localStorage.getItem("currentUser"))
);
this.currentUser = this.currentUserSubject.asObservable();
this.alwaysLogin();
}
public get currentUserValue(): User {
@@ -71,13 +69,13 @@ export class AuthenticationService extends BaseService {
}
}
private alwaysLogin() {
return this.http.get(`${this.apiUrl}/User/AlwaysLogin`, {
headers: this.headers
}).subscribe();
public alwaysLogin() {
this.http.get(`${this.apiUrl}/User/AlwaysLogin`,
{ headers: this.headers })
.subscribe(data => { console.log(data); });
}
logout() {
public logout() {
localStorage.removeItem("currentUser");
this.currentUserSubject.next(null);
}