1
0
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:
Flam3rboy 2021-10-09 13:04:46 +02:00
parent 37a2410526
commit 77aab2bdd3

View File

@ -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" },