Redirect to Login page
This commit is contained in:
@@ -19,7 +19,12 @@ export default class API {
|
||||
body: JSON.stringify(params)
|
||||
});
|
||||
|
||||
return await response.json();
|
||||
let res = await response.json();
|
||||
if (!res.success && res.msg === "You are not logged in.") {
|
||||
document.location.reload();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
async fetchUser() {
|
||||
|
||||
Reference in New Issue
Block a user