mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add welcome page
This commit is contained in:
@@ -30,7 +30,9 @@ const axiosInstance = axios.create({ baseURL: "./rest", withCredentials: true })
|
||||
axiosInstance.interceptors.response.use(
|
||||
response => response,
|
||||
error => {
|
||||
if (error.response.status === 401) window.location.hash = "/login"
|
||||
if (error.response.status === 401 && error.response.data === "Credentials are required to access this resource.") {
|
||||
window.location.hash = "/welcome"
|
||||
}
|
||||
throw error
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user