mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-24 11:22:31 +01:00
🎨 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:
|
||||
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`, {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
|
Loading…
Reference in New Issue
Block a user