add welcome page

This commit is contained in:
Athou
2023-05-04 21:27:02 +02:00
parent 05453364ff
commit e0f242fe22
36 changed files with 322 additions and 14 deletions

View File

@@ -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
}
)