relogin on 403
This commit is contained in:
parent
29b9d7a853
commit
37998bee63
@ -8,6 +8,15 @@ export const api = createApi({
|
||||
reducerPath: "auth",
|
||||
baseQuery: fetchBaseQuery({
|
||||
baseUrl: getConfigValue("journal.back.url"),
|
||||
fetchFn: async (input: RequestInfo | URL, init?: RequestInit | undefined) => {
|
||||
const response = await fetch(input, init);
|
||||
|
||||
if (response.status === 403) {
|
||||
keycloak.login();
|
||||
}
|
||||
|
||||
return response;
|
||||
},
|
||||
headers: {
|
||||
"Content-Type": "application/json;charset=utf-8",
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user