From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1740698576; bh=pX4BEt95aMP7hVx6ZsVT3X0BttwyYnLm/RAPgbvgv7Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=M6mJwOHBCIvJUTAA6XUfP5lMfZWJm201TKyHbuLSY0+pqFwAFPadjWi9wvTZDRudG VcsiTOkJqSFyMgPCShpmuYllkcPSwxKwCnY6JJ0VAJtoAJC1C+kQsxnpfWShAYLRxQ DCBUg5tc9+j9v6kZU4gUFUInrD1Roe/wsipFH8Ji0qj/y2yiul255VWN+MRIPrmBE/ a2R9kvaviouylB/9DVNeTJEuxlKUTldUGMxcK1J2ZaeU60LESY0bsDB8t5OZHT9VM8 QgEot7JevfCfz9ElMsiT/i6OsXXdayBG6c3UbcGR7PF655PFLkMGrXRXNLpIBA3uGV 83PPc3zuEWBuQ== Received: from integral2.. (unknown [182.253.126.171]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id DDD132074491; Thu, 27 Feb 2025 23:22:54 +0000 (UTC) From: Ammar Faizi To: Muhammad Rizki Cc: Ammar Faizi , GNU/Weeb Mailing List , Alviro Iskandar Setiawan Subject: [PATCH gwmail 7/7] old: Use relative path to redirect Date: Fri, 28 Feb 2025 06:22:34 +0700 Message-Id: <20250227232234.809858-8-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250227232234.809858-1-ammarfaizi2@gnuweeb.org> References: <20250227232234.809858-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Since we are now in a sub directory, use relative path. Signed-off-by: Ammar Faizi --- old/assets/js/api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/old/assets/js/api.js b/old/assets/js/api.js index 0a9109146c43..eb1467cd4543 100644 --- a/old/assets/js/api.js +++ b/old/assets/js/api.js @@ -1,4 +1,4 @@ -const GWM_API_URL = "https://mail.gnuweeb.org/api2.php?action="; +const GWM_API_URL = "https://mail.gnuweeb.org/api.php?action="; const LS = localStorage; function gid(i) @@ -110,7 +110,7 @@ function gwm_cb_login(j) LS.setItem("gwm_token_exp_at", r.token_exp_at); LS.setItem("gwm_uinfo", JSON.stringify(r.user_info)); alert("Login successful!"); - window.location.href = "/home.html"; + window.location.href = "home.html"; } function gwm_fn_login(cb, user, pass) @@ -157,7 +157,7 @@ function gwm_fn_set_user_info(cb, data) function gwm_fn_logout() { LS.clear(); - window.location.href = "/"; + window.location.href = "index.html"; } function gwm_auth_get_user() @@ -168,7 +168,7 @@ function gwm_auth_get_user() function gwm_auth_redirect_if_authorized() { if (LS.getItem("gwm_token")) { - window.location.href = "/home.html"; + window.location.href = "home.html"; return true; } -- Ammar Faizi