public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Muhammad Rizki <[email protected]>
Cc: Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>
Subject: [PATCH gwmail 7/7] old: Use relative path to redirect
Date: Fri, 28 Feb 2025 06:22:34 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Since we are now in a sub directory, use relative path.

Signed-off-by: Ammar Faizi <[email protected]>
---
 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


  parent reply	other threads:[~2025-02-27 23:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-27 23:22 [PATCH gwmail 0/7] User Profile Page Ammar Faizi
2025-02-27 23:22 ` [PATCH gwmail 1/7] settings/account: Add header 'change password' Ammar Faizi
2025-02-27 23:22 ` [PATCH gwmail 2/7] public: Refactor old interface to keep up with new API Ammar Faizi
2025-02-27 23:22 ` [PATCH gwmail 3/7] Rename 'public' to 'old' Ammar Faizi
2025-02-27 23:22 ` [PATCH gwmail 4/7] old: Add profile page Ammar Faizi
2025-02-27 23:22 ` [PATCH gwmail 5/7] old: Add photo profile support Ammar Faizi
2025-02-27 23:22 ` [PATCH gwmail 6/7] routes: layout: Adjust field with new API Ammar Faizi
2025-02-27 23:22 ` Ammar Faizi [this message]
2025-02-27 23:28 ` [PATCH gwmail 0/7] User Profile Page Ammar Faizi
2025-02-27 23:31   ` Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox