Redirect to Login page

This commit is contained in:
2020-06-23 01:03:35 +02:00
parent 9e9e481576
commit 42e1ac95c8
3 changed files with 8 additions and 3 deletions

View File

@@ -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() {