fix
This commit is contained in:
parent
4346f81e23
commit
e16937dac6
@ -46,7 +46,9 @@ const parseResponse = async (response) => {
|
|||||||
|
|
||||||
if (status === 401) {
|
if (status === 401) {
|
||||||
clearSession();
|
clearSession();
|
||||||
if(!location.pathname.includes('/login') && !location.pathname.includes('/register')) location.pathname = '/login';
|
if (!location.pathname.includes('/login')
|
||||||
|
&& !location.pathname.includes('/register')
|
||||||
|
&& location.pathname !== '/') location.pathname = '/login';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (headers['content-type']?.includes('application/json')) {
|
if (headers['content-type']?.includes('application/json')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user