This commit is contained in:
Fabio Formosa
2022-10-04 23:30:09 +02:00
parent b92d8275db
commit 6715665072

View File

@@ -20,8 +20,7 @@ export class UserService {
}
refreshToken() {
const promise = this.apiService.get(this.config.refresh_token_url).toPromise()
.then(res => {
this.apiService.get(this.config.refresh_token_url).subscribe(res => {
if (res.access_token !== null) {
return this.getUserInfo().toPromise()
.then(user => {
@@ -29,8 +28,6 @@ export class UserService {
});
}
})
.catch(() => null);
return promise;
}
fetchLoggedUser() {