mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
redirect to login page on 401
This commit is contained in:
parent
8310063501
commit
5962a2460b
@ -25,8 +25,8 @@ export function ApiProvider({ children, options }: ApiProviderType) {
|
||||
return axios.get(path, { params }).then((res) => res.data);
|
||||
},
|
||||
onError: (error, _key) => {
|
||||
if (error.status === 401) {
|
||||
window.location.reload();
|
||||
if (error.response.status === 401) {
|
||||
window.location.href = "login";
|
||||
}
|
||||
},
|
||||
...options,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user