Skip to content

Commit 0f781e6

Browse files
committed
old: Use relative path to redirect
Since we are now in a sub directory, use relative path. Signed-off-by: Ammar Faizi <[email protected]>
1 parent 217d286 commit 0f781e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

old/assets/js/api.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const GWM_API_URL = "https://mail.gnuweeb.org/api2.php?action=";
1+
const GWM_API_URL = "https://mail.gnuweeb.org/api.php?action=";
22
const LS = localStorage;
33

44
function gid(i)
@@ -110,7 +110,7 @@ function gwm_cb_login(j)
110110
LS.setItem("gwm_token_exp_at", r.token_exp_at);
111111
LS.setItem("gwm_uinfo", JSON.stringify(r.user_info));
112112
alert("Login successful!");
113-
window.location.href = "/home.html";
113+
window.location.href = "home.html";
114114
}
115115

116116
function gwm_fn_login(cb, user, pass)
@@ -157,7 +157,7 @@ function gwm_fn_set_user_info(cb, data)
157157
function gwm_fn_logout()
158158
{
159159
LS.clear();
160-
window.location.href = "/";
160+
window.location.href = "index.html";
161161
}
162162

163163
function gwm_auth_get_user()
@@ -168,7 +168,7 @@ function gwm_auth_get_user()
168168
function gwm_auth_redirect_if_authorized()
169169
{
170170
if (LS.getItem("gwm_token")) {
171-
window.location.href = "/home.html";
171+
window.location.href = "home.html";
172172
return true;
173173
}
174174

0 commit comments

Comments
 (0)