From 7e335fa26606904528e70b0de9817324bc08f84b Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 9 Oct 2021 13:04:46 +0200 Subject: :art: do not auto guest register on login/register page --- api/client_test/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/client_test') diff --git a/api/client_test/index.html b/api/client_test/index.html index fb2e0a2d..41d41598 100644 --- a/api/client_test/index.html +++ b/api/client_test/index.html @@ -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" }, -- cgit 1.4.1