perbaikan service

This commit is contained in:
2024-07-16 15:53:22 +07:00
parent efb6ae0060
commit 768c9ee6ca
3 changed files with 6 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import { jwtDecode } from "jwt-decode";
import { Router } from "@angular/router";
import { switchMap, debounceTime, mapTo, startWith } from "rxjs/operators";
import { AuthService } from "src/app/_services/auth.service";
import { error } from "console";
const BASE_URL = "https://kapi.absys.ninja/hemat";
interface CustomJwtPayload {
@@ -167,6 +168,9 @@ export class LoginService {
JSON.stringify(userProfile)
);
window.location.reload();
}, (error) => {
console.error(error);
this.checkTokenAndRedirect();
}
);
}