🎨 do not auto guest register on login/register page
This commit is contained in:
parent
37a2410526
commit
77aab2bdd3
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
// Auto register guest account:
|
// Auto register guest account:
|
||||||
const token = JSON.parse(localStorage.getItem("token"));
|
const token = JSON.parse(localStorage.getItem("token"));
|
||||||
if (!token) {
|
if (!token && location.pathname !== "/login" && location.pathname !== "/register") {
|
||||||
fetch(`${window.GLOBAL_ENV.API_ENDPOINT}/auth/register`, {
|
fetch(`${window.GLOBAL_ENV.API_ENDPOINT}/auth/register`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "content-type": "application/json" },
|
headers: { "content-type": "application/json" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user